-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove: 使われていない画像を削除 * remove: 不要なXMLの削除 * fix: [Android] Desugaringを有効に * add: Androidにおける通知チャンネル・チャンネルグループ登録実装 * fix: ProviderObserverをmain.dartから分離 * fix: introductionScreenのPadding調整 * fix: 利用していないChannelを削除 * Restyle Androidの通知関連修正 (#438) Restyled by whitespace Co-authored-by: Restyled.io <[email protected]> --------- Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com> Co-authored-by: Restyled.io <[email protected]>
- Loading branch information
1 parent
03ba97c
commit f235143
Showing
20 changed files
with
164 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
android/app/src/main/res/drawable-v21/launch_background.xml
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import 'dart:developer'; | ||
|
||
import 'package:hooks_riverpod/hooks_riverpod.dart'; | ||
import 'package:talker_flutter/talker_flutter.dart'; | ||
|
||
class CustomProviderObserver extends ProviderObserver { | ||
CustomProviderObserver(this.talker); | ||
|
||
final Talker talker; | ||
|
||
@override | ||
void didAddProvider( | ||
ProviderBase<Object?> provider, | ||
Object? value, | ||
ProviderContainer container, | ||
) => | ||
switch (provider.name) { | ||
_ when value.toString().length > 1000 => log( | ||
'${provider.name} (${provider.runtimeType}) ' | ||
'${value?.toString().length} ', | ||
name: 'didAddProvider', | ||
), | ||
_ => log( | ||
'${provider.name} ($provider)', | ||
name: 'didAddProvider', | ||
), | ||
}; | ||
|
||
@override | ||
void didDisposeProvider( | ||
ProviderBase<Object?> provider, | ||
ProviderContainer container, | ||
) => | ||
log('didDisposeProvider: ${provider.name}'); | ||
|
||
@override | ||
void didUpdateProvider( | ||
ProviderBase<Object?> provider, | ||
Object? previousValue, | ||
Object? newValue, | ||
ProviderContainer container, | ||
) => | ||
switch (provider.name) { | ||
'mapViewModelProvider' || 'kmoniViewModelProvider' => null, | ||
_ | ||
when newValue.toString().length + previousValue.toString().length > | ||
300 => | ||
log( | ||
'${provider.name} (${previousValue.runtimeType} ' | ||
'-> ${newValue.runtimeType})', | ||
name: 'didUpdateProvider', | ||
), | ||
_ => log( | ||
'${provider.name} ($previousValue -> $newValue)', | ||
name: 'didUpdateProvider', | ||
), | ||
}; | ||
|
||
@override | ||
void providerDidFail( | ||
ProviderBase<Object?> provider, | ||
Object error, | ||
StackTrace stackTrace, | ||
ProviderContainer container, | ||
) { | ||
talker.handle(error, stackTrace, 'providerDidFail: ${provider.name}'); | ||
log( | ||
'${provider.name} $error', | ||
name: 'providerDidFail', | ||
error: error, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.