Prefer void to null (#22977)
* Future<void> main * Future<void>.delayed * prefer_void_to_Null * address review comments
This commit is contained in:
committed by
GitHub
parent
5efe095895
commit
0fb84e96c7
@@ -138,7 +138,7 @@ class FullScreenCodeDialogState extends State<FullScreenCodeDialog> {
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
getExampleCode(widget.exampleCodeTag, DefaultAssetBundle.of(context)).then<Null>((String code) {
|
||||
getExampleCode(widget.exampleCodeTag, DefaultAssetBundle.of(context)).then<void>((String code) {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_exampleCode = code ?? 'Example code not found';
|
||||
|
||||
@@ -17,7 +17,7 @@ Future<String> getExampleCode(String tag, AssetBundle bundle) async {
|
||||
return _exampleCode[tag];
|
||||
}
|
||||
|
||||
Future<Null> _parseExampleCode(AssetBundle bundle) async {
|
||||
Future<void> _parseExampleCode(AssetBundle bundle) async {
|
||||
final String code = await bundle.loadString('lib/gallery/example_code.dart') ??
|
||||
'// lib/gallery/example_code.dart not found\n';
|
||||
_exampleCode = <String, String>{};
|
||||
|
||||
Reference in New Issue
Block a user