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
Jaime Blasco
2020-11-11 10:52:14 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e0e74cf3f90c0782b55bd3ce6b5f709aae5cbdc0
e0e74cf3
1 parent
c0a3b4cf
fix navigator example
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
64 deletions
example/lib/modals/modal_with_navigator.dart
example/pubspec.lock
example/lib/modals/modal_with_navigator.dart
View file @
e0e74cf
...
...
@@ -6,11 +6,11 @@ class ModalWithNavigator extends StatelessWidget {
const
ModalWithNavigator
({
Key
key
})
:
super
(
key:
key
);
@override
Widget
build
(
BuildContext
c
ontext
)
{
Widget
build
(
BuildContext
rootC
ontext
)
{
return
Material
(
child:
Navigator
(
onGenerateRoute:
(
_
)
=>
MaterialPageRoute
(
builder:
(
context
)
=>
Builder
(
builder:
(
context
2
)
=>
Builder
(
builder:
(
context
)
=>
CupertinoPageScaffold
(
navigationBar:
CupertinoNavigationBar
(
leading:
Container
(),
middle:
Text
(
'Modal Page'
)),
...
...
@@ -26,26 +26,25 @@ class ModalWithNavigator extends StatelessWidget {
(
index
)
=>
ListTile
(
title:
Text
(
'Item'
),
onTap:
()
{
Navigator
.
of
(
context
).
pushAndRemoveUntil
(
MaterialPageRoute
(
builder:
(
context
)
=>
CupertinoPageScaffold
(
navigationBar:
CupertinoNavigationBar
(
middle:
Text
(
'New Page'
),
),
child:
Stack
(
fit:
StackFit
.
expand
,
children:
<
Widget
>[
MaterialButton
(
onPressed:
()
=>
Navigator
.
of
(
context
)
.
pop
(),
child:
Text
(
'touch here'
),
)
],
))),
ModalRoute
.
withName
(
'/'
));
Navigator
.
of
(
context
).
push
(
MaterialPageRoute
(
builder:
(
context
)
=>
CupertinoPageScaffold
(
navigationBar:
CupertinoNavigationBar
(
middle:
Text
(
'New Page'
),
),
child:
Stack
(
fit:
StackFit
.
expand
,
children:
<
Widget
>[
MaterialButton
(
onPressed:
()
=>
Navigator
.
of
(
rootContext
).
pop
(),
child:
Text
(
'touch here'
),
)
],
),
),
),
);
},
)),
).
toList
(),
...
...
example/pubspec.lock
View file @
e0e74cf
...
...
@@ -7,42 +7,42 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0-nullsafety"
version: "2.5.0-nullsafety
.2
"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety"
version: "2.1.0-nullsafety
.2
"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.
2
"
version: "1.1.0-nullsafety.
4
"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety"
version: "1.2.0-nullsafety
.2
"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety"
version: "1.1.0-nullsafety
.2
"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0-nullsafety.
2
"
version: "1.15.0-nullsafety.
4
"
cupertino_icons:
dependency: "direct main"
description:
...
...
@@ -56,7 +56,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.
1.0-nullsafety
"
version: "1.
2.0-nullsafety.2
"
flutter:
dependency: "direct main"
description: flutter
...
...
@@ -72,55 +72,48 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3-nullsafety.2"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10-nullsafety"
version: "0.12.10-nullsafety
.2
"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.
2
"
version: "1.3.0-nullsafety.
5
"
modal_bottom_sheet:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "1.
0
.0-dev"
version: "1.
1
.0-dev"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety"
platform_detect:
dependency: transitive
description:
name: platform_detect
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.0"
version: "1.8.0-nullsafety.2"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
pub_semver:
dependency: transitive
description:
name: pub_semver
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.4"
version: "1.0.3"
sky_engine:
dependency: transitive
description: flutter
...
...
@@ -132,98 +125,98 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety"
version: "1.8.0-nullsafety
.3
"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety"
version: "1.10.0-nullsafety
.5
"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety"
version: "2.1.0-nullsafety
.2
"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety"
version: "1.1.0-nullsafety
.2
"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety"
version: "1.2.0-nullsafety
.2
"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19-nullsafety"
version: "0.2.19-nullsafety
.4
"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.
2
"
version: "1.3.0-nullsafety.
4
"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "5.
6.
0"
version: "5.
7.1
0"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+
1
"
version: "0.0.1+
4
"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+
8
"
version: "0.0.1+
9
"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.
8
"
version: "1.0.
9
"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.
3+2
"
version: "0.1.
5+1
"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+
1
"
version: "0.0.1+
3
"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.
2
"
version: "2.1.0-nullsafety.
4
"
sdks:
dart: ">=2.10.0-0.0.dev <2.10.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"
dart: ">=2.11.0-0.0 <2.12.0"
flutter: ">=1.22.0 <2.0.0"
...
...
Please
register
or
login
to post a comment