Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
modal_bottom_sheet
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
tb2761
2020-04-11 14:29:41 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f8db10e18d94f801e44e555c059f8b5353fad7d5
f8db10e1
1 parent
4c967b14
fix: use default value when MaterialLocalizations are not available
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
lib/src/bottom_sheet_route.dart
lib/src/bottom_sheet_route.dart
View file @
f8db10e
import
'dart:async'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/material.dart'
;
import
'../modal_bottom_sheet.dart'
;
...
...
@@ -33,21 +34,19 @@ class _ModalBottomSheet<T> extends StatefulWidget {
class
_ModalBottomSheetState
<
T
>
extends
State
<
_ModalBottomSheet
<
T
>>
{
String
_getRouteLabel
()
{
if
(
Theme
.
of
(
context
,
shadowThemeOnly:
true
)
==
null
)
{
return
''
;
}
else
{
final
platform
=
Theme
.
of
(
context
).
platform
;
final
platform
=
Theme
.
of
(
context
)?.
platform
??
defaultTargetPlatform
;
switch
(
platform
)
{
case
TargetPlatform
.
iOS
:
return
''
;
case
TargetPlatform
.
android
:
case
TargetPlatform
.
fuchsia
:
assert
(
debugCheckHasMaterialLocalizations
(
context
));
if
(
Localizations
.
of
(
context
,
MaterialLocalizations
)
!=
null
)
{
return
MaterialLocalizations
.
of
(
context
).
dialogLabel
;
break
;
}
else
{
return
DefaultMaterialLocalizations
().
dialogLabel
;
}
return
null
;
}
return
null
;
}
@override
...
...
Please
register
or
login
to post a comment