Showing
6 changed files
with
33 additions
and
40 deletions
| @@ -80,7 +80,6 @@ class _CupertinoBooksAppState extends State<CupertinoBooksApp> { | @@ -80,7 +80,6 @@ class _CupertinoBooksAppState extends State<CupertinoBooksApp> { | ||
| 80 | } | 80 | } |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | - | ||
| 84 | class BooksListScreen extends StatelessWidget { | 83 | class BooksListScreen extends StatelessWidget { |
| 85 | const BooksListScreen({ | 84 | const BooksListScreen({ |
| 86 | required this.books, | 85 | required this.books, |
| @@ -80,7 +80,6 @@ class _BooksAppState extends State<BooksApp> { | @@ -80,7 +80,6 @@ class _BooksAppState extends State<BooksApp> { | ||
| 80 | } | 80 | } |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | - | ||
| 84 | class BooksListScreen extends StatelessWidget { | 83 | class BooksListScreen extends StatelessWidget { |
| 85 | const BooksListScreen({ | 84 | const BooksListScreen({ |
| 86 | required this.books, | 85 | required this.books, |
| @@ -34,35 +34,34 @@ class _FitSheetState extends State<FitResizableSheet> { | @@ -34,35 +34,34 @@ class _FitSheetState extends State<FitResizableSheet> { | ||
| 34 | 34 | ||
| 35 | @override | 35 | @override |
| 36 | Widget build(BuildContext context) { | 36 | Widget build(BuildContext context) { |
| 37 | - return Sheet( | ||
| 38 | - elevation: 4, | ||
| 39 | - resizable: true, | ||
| 40 | - minResizableExtent: 200, | ||
| 41 | - physics: const SnapSheetPhysics( | ||
| 42 | - stops: <double>[0, 200, double.infinity], | ||
| 43 | - relative: false, | ||
| 44 | - parent: BouncingSheetPhysics(), | ||
| 45 | - ), | ||
| 46 | - child: Container( | ||
| 47 | - height: 500, | ||
| 48 | - child: Scaffold( | ||
| 49 | - backgroundColor: Colors.white, | ||
| 50 | - body: const Center( | ||
| 51 | - child: Text('Hello'), | ||
| 52 | - ), | ||
| 53 | - bottomNavigationBar: BottomAppBar( | ||
| 54 | - elevation: 4, | ||
| 55 | - child: Row( | ||
| 56 | - children: <Widget>[ | ||
| 57 | - IconButton( | ||
| 58 | - icon: const Icon(Icons.access_alarm), onPressed: () {}) | ||
| 59 | - ], | ||
| 60 | - ), | 37 | + return Sheet( |
| 38 | + elevation: 4, | ||
| 39 | + resizable: true, | ||
| 40 | + minResizableExtent: 200, | ||
| 41 | + physics: const SnapSheetPhysics( | ||
| 42 | + stops: <double>[0, 200, double.infinity], | ||
| 43 | + relative: false, | ||
| 44 | + parent: BouncingSheetPhysics(), | ||
| 45 | + ), | ||
| 46 | + child: Container( | ||
| 47 | + height: 500, | ||
| 48 | + child: Scaffold( | ||
| 49 | + backgroundColor: Colors.white, | ||
| 50 | + body: const Center( | ||
| 51 | + child: Text('Hello'), | ||
| 52 | + ), | ||
| 53 | + bottomNavigationBar: BottomAppBar( | ||
| 54 | + elevation: 4, | ||
| 55 | + child: Row( | ||
| 56 | + children: <Widget>[ | ||
| 57 | + IconButton( | ||
| 58 | + icon: const Icon(Icons.access_alarm), onPressed: () {}) | ||
| 59 | + ], | ||
| 61 | ), | 60 | ), |
| 62 | ), | 61 | ), |
| 63 | ), | 62 | ), |
| 64 | - controller: controller, | ||
| 65 | - | 63 | + ), |
| 64 | + controller: controller, | ||
| 66 | ); | 65 | ); |
| 67 | } | 66 | } |
| 68 | } | 67 | } |
| 1 | import 'dart:async'; | 1 | import 'dart:async'; |
| 2 | 2 | ||
| 3 | - | ||
| 4 | import 'package:flutter/material.dart'; | 3 | import 'package:flutter/material.dart'; |
| 5 | import 'package:flutter/widgets.dart'; | 4 | import 'package:flutter/widgets.dart'; |
| 6 | import 'package:sheet/sheet.dart'; | 5 | import 'package:sheet/sheet.dart'; |
| @@ -33,14 +32,13 @@ class _NoMomentumSheetState extends State<NoMomentumSheet> { | @@ -33,14 +32,13 @@ class _NoMomentumSheetState extends State<NoMomentumSheet> { | ||
| 33 | 32 | ||
| 34 | @override | 33 | @override |
| 35 | Widget build(BuildContext context) { | 34 | Widget build(BuildContext context) { |
| 36 | - return Sheet( | ||
| 37 | - minExtent: 100, | ||
| 38 | - maxExtent: 400, | ||
| 39 | - elevation: 4, | ||
| 40 | - physics: const NoMomentumSheetPhysics(), | ||
| 41 | - child: Container(), | ||
| 42 | - controller: controller, | ||
| 43 | - | 35 | + return Sheet( |
| 36 | + minExtent: 100, | ||
| 37 | + maxExtent: 400, | ||
| 38 | + elevation: 4, | ||
| 39 | + physics: const NoMomentumSheetPhysics(), | ||
| 40 | + child: Container(), | ||
| 41 | + controller: controller, | ||
| 44 | ); | 42 | ); |
| 45 | } | 43 | } |
| 46 | } | 44 | } |
| @@ -3,8 +3,6 @@ import 'package:example/sheet_example_page.dart'; | @@ -3,8 +3,6 @@ import 'package:example/sheet_example_page.dart'; | ||
| 3 | import 'package:flutter/material.dart'; | 3 | import 'package:flutter/material.dart'; |
| 4 | import 'package:sheet/route.dart'; | 4 | import 'package:sheet/route.dart'; |
| 5 | 5 | ||
| 6 | - | ||
| 7 | - | ||
| 8 | void main() => runApp(MyApp()); | 6 | void main() => runApp(MyApp()); |
| 9 | 7 | ||
| 10 | class MyApp extends StatelessWidget { | 8 | class MyApp extends StatelessWidget { |
| 1 | export 'src/route/base_route_extended.dart'; | 1 | export 'src/route/base_route_extended.dart'; |
| 2 | export 'src/route/cupertino/sheet_route.dart'; | 2 | export 'src/route/cupertino/sheet_route.dart'; |
| 3 | export 'src/route/delegated_transitions_route.dart'; | 3 | export 'src/route/delegated_transitions_route.dart'; |
| 4 | -export 'src/route/sheet_route.dart'; | ||
| 4 | +export 'src/route/sheet_route.dart'; |
-
Please register or login to post a comment