Showing
22 changed files
with
263 additions
and
59 deletions
example/assets/MacBook.jpg
0 → 100644
126 KB
example/assets/demo_image.jpeg
0 → 100644
2.08 MB
example/assets/flutter.png
0 → 100644
20.7 KB
example/assets/github.png
0 → 100644
10.2 KB
example/assets/github_app.png
0 → 100644
6.94 KB
example/assets/jaimeblasco.jpeg
0 → 100644
8.03 KB
example/assets/mail.png
0 → 100644
46.1 KB
example/assets/message.png
0 → 100644
39.5 KB
example/assets/person1.jpeg
0 → 100644
323 KB
example/assets/person2.jpeg
0 → 100644
293 KB
example/assets/person3.jpeg
0 → 100644
612 KB
example/assets/person4.jpeg
0 → 100644
1.5 MB
example/assets/slack.png
0 → 100644
14.1 KB
example/assets/twitter.png
0 → 100644
1.62 KB
| @@ -16,9 +16,8 @@ class CupertinoSharePage extends StatelessWidget { | @@ -16,9 +16,8 @@ class CupertinoSharePage extends StatelessWidget { | ||
| 16 | child: Center( | 16 | child: Center( |
| 17 | child: Hero( | 17 | child: Hero( |
| 18 | tag: 'image', | 18 | tag: 'image', |
| 19 | - child: Image.network( | ||
| 20 | - 'https://images.unsplash.com/photo-1586042062881-03688ce69774')), | ||
| 21 | - ), | 19 | + child: Image.asset('assets/demo_image.jpeg'), |
| 20 | + )), | ||
| 22 | ), | 21 | ), |
| 23 | bottomNavigationBar: bottomAppBar(context)); | 22 | bottomNavigationBar: bottomAppBar(context)); |
| 24 | } | 23 | } |
| @@ -116,22 +115,20 @@ class PhotoShareBottomSheet extends StatelessWidget { | @@ -116,22 +115,20 @@ class PhotoShareBottomSheet extends StatelessWidget { | ||
| 116 | borderRadius: BorderRadius.circular(12), | 115 | borderRadius: BorderRadius.circular(12), |
| 117 | child: Hero( | 116 | child: Hero( |
| 118 | tag: 'image', | 117 | tag: 'image', |
| 119 | - child: Image.network( | ||
| 120 | - 'https://images.unsplash.com/photo-1586042062881-03688ce69774'), | 118 | + child: |
| 119 | + Image.asset('assets/demo_image.jpeg'), | ||
| 121 | ))), | 120 | ))), |
| 122 | Padding( | 121 | Padding( |
| 123 | padding: EdgeInsets.symmetric(horizontal: 6), | 122 | padding: EdgeInsets.symmetric(horizontal: 6), |
| 124 | child: ClipRRect( | 123 | child: ClipRRect( |
| 125 | borderRadius: BorderRadius.circular(12), | 124 | borderRadius: BorderRadius.circular(12), |
| 126 | - child: Image.network( | ||
| 127 | - 'https://images.unsplash.com/photo-1586042062881-03688ce69774'), | 125 | + child: Image.asset('assets/demo_image.jpeg'), |
| 128 | )), | 126 | )), |
| 129 | Padding( | 127 | Padding( |
| 130 | padding: EdgeInsets.symmetric(horizontal: 6), | 128 | padding: EdgeInsets.symmetric(horizontal: 6), |
| 131 | child: ClipRRect( | 129 | child: ClipRRect( |
| 132 | borderRadius: BorderRadius.circular(12), | 130 | borderRadius: BorderRadius.circular(12), |
| 133 | - child: Image.network( | ||
| 134 | - 'https://images.unsplash.com/photo-1586042062881-03688ce69774'), | 131 | + child: Image.asset('assets/demo_image.jpeg'), |
| 135 | )), | 132 | )), |
| 136 | ], | 133 | ], |
| 137 | ), | 134 | ), |
| @@ -167,7 +164,7 @@ class PhotoShareBottomSheet extends StatelessWidget { | @@ -167,7 +164,7 @@ class PhotoShareBottomSheet extends StatelessWidget { | ||
| 167 | decoration: BoxDecoration( | 164 | decoration: BoxDecoration( |
| 168 | image: DecorationImage( | 165 | image: DecorationImage( |
| 169 | image: | 166 | image: |
| 170 | - NetworkImage(app.imageUrl), | 167 | + AssetImage(app.imageUrl), |
| 171 | fit: BoxFit.cover), | 168 | fit: BoxFit.cover), |
| 172 | color: Colors.white, | 169 | color: Colors.white, |
| 173 | borderRadius: | 170 | borderRadius: |
| @@ -292,7 +289,7 @@ class PhotoShareBottomSheet extends StatelessWidget { | @@ -292,7 +289,7 @@ class PhotoShareBottomSheet extends StatelessWidget { | ||
| 292 | children: <Widget>[ | 289 | children: <Widget>[ |
| 293 | Material( | 290 | Material( |
| 294 | child: CircleAvatar( | 291 | child: CircleAvatar( |
| 295 | - backgroundImage: NetworkImage( | 292 | + backgroundImage: AssetImage( |
| 296 | person.imageUrl, | 293 | person.imageUrl, |
| 297 | ), | 294 | ), |
| 298 | radius: 30, | 295 | radius: 30, |
| @@ -338,8 +335,8 @@ class PhotoShareBottomSheet extends StatelessWidget { | @@ -338,8 +335,8 @@ class PhotoShareBottomSheet extends StatelessWidget { | ||
| 338 | SizedBox(width: 18), | 335 | SizedBox(width: 18), |
| 339 | ClipRRect( | 336 | ClipRRect( |
| 340 | borderRadius: BorderRadius.circular(4), | 337 | borderRadius: BorderRadius.circular(4), |
| 341 | - child: Image.network( | ||
| 342 | - 'https://images.unsplash.com/photo-1586042062881-03688ce69774', | 338 | + child: Image.asset( |
| 339 | + 'assets/demo_image.jpeg', | ||
| 343 | fit: BoxFit.cover, | 340 | fit: BoxFit.cover, |
| 344 | height: 40, | 341 | height: 40, |
| 345 | width: 40, | 342 | width: 40, |
| @@ -422,31 +419,24 @@ class Item { | @@ -422,31 +419,24 @@ class Item { | ||
| 422 | } | 419 | } |
| 423 | 420 | ||
| 424 | final people = [ | 421 | final people = [ |
| 425 | - Item('MacBook Pro', | ||
| 426 | - 'https://www.uoduckstore.com/TDS%20Product%20Images/Apple%20MacBook%20Pro%2016%20w%20T%20Bar%20Late%202019_1.jpg'), | ||
| 427 | - Item('Jaime Blasco', | ||
| 428 | - 'https://media-exp1.licdn.com/dms/image/C5603AQGfIMBxWBRMSg/profile-displayphoto-shrink_200_200/0?e=1591833600&v=beta&t=r6xnd4oBDfb3A3IcsgliyrT_avYaeBEwRr9XtlizWq8'), | ||
| 429 | - Item('Mya Johnston', | ||
| 430 | - 'https://images.unsplash.com/photo-1520813792240-56fc4a3765a7'), | 422 | + Item('MacBook Pro', 'assets/MacBook.jpg'), |
| 423 | + Item('Jaime Blasco', 'assets/jaimeblasco.jpeg'), | ||
| 424 | + Item('Mya Johnston', 'assets/person1.jpeg'), | ||
| 425 | + // https://images.unsplash.com/photo-1520813792240-56fc4a3765a7' | ||
| 431 | Item('Maxime Nicholls', | 426 | Item('Maxime Nicholls', |
| 432 | - 'https://images.unsplash.com/photo-1520719627573-5e2c1a6610f0'), | 427 | + 'assets/person4.jpeg'), //https://images.unsplash.com/photo-1568707043650-eb03f2536825' |
| 433 | Item('Susanna Thorne', | 428 | Item('Susanna Thorne', |
| 434 | - 'https://images.unsplash.com/photo-1568707043650-eb03f2536825'), | ||
| 435 | - Item('Jarod Aguilar', | ||
| 436 | - 'https://images.unsplash.com/photo-1547106634-56dcd53ae883') | 429 | + 'assets/person2.jpeg'), //https://images.unsplash.com/photo-1520719627573-5e2c1a6610f0 |
| 430 | + Item('Jarod Aguilar', 'assets/person3.jpeg') | ||
| 431 | + //https://images.unsplash.com/photo-1547106634-56dcd53ae883 | ||
| 437 | ]; | 432 | ]; |
| 438 | 433 | ||
| 439 | final apps = [ | 434 | final apps = [ |
| 440 | - Item('Messages', | ||
| 441 | - 'https://upload.wikimedia.org/wikipedia/commons/thumb/5/51/IMessage_logo.svg/1200px-IMessage_logo.svg.png'), | ||
| 442 | - Item('Github', | ||
| 443 | - 'https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png'), | ||
| 444 | - Item('Slack', | ||
| 445 | - 'https://is3-ssl.mzstatic.com/image/thumb/Purple113/v4/6e/80/06/6e80063f-e5c8-3f20-d8d5-22dd0740f5ba/AppIcon-0-0-1x_U007emarketing-0-0-0-7-0-0-sRGB-0-0-0-GLES2_U002c0-512MB-85-220-0-0.png/246x0w.png'), | ||
| 446 | - Item('Twitter', | ||
| 447 | - 'https://cfcdnpull-creativefreedoml.netdna-ssl.com/wp-content/uploads/2015/06/Twitter-bird-white-blue2.png'), | ||
| 448 | - Item('Mail', | ||
| 449 | - 'https://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/Mail_%28iOS%29.svg/1200px-Mail_%28iOS%29.svg.png'), | 435 | + Item('Messages', 'assets/message.png'), |
| 436 | + Item('Github', 'assets/github_app.png'), | ||
| 437 | + Item('Slack', 'assets/slack.png'), | ||
| 438 | + Item('Twitter', 'assets/twitter.png'), | ||
| 439 | + Item('Mail', 'assets/mail.png'), | ||
| 450 | ]; | 440 | ]; |
| 451 | 441 | ||
| 452 | final actions = [ | 442 | final actions = [ |
| 1 | import 'package:example/modals/circular_modal.dart'; | 1 | import 'package:example/modals/circular_modal.dart'; |
| 2 | +import 'package:example/web_frame.dart'; | ||
| 2 | import 'package:flutter/cupertino.dart'; | 3 | import 'package:flutter/cupertino.dart'; |
| 3 | import 'package:flutter/material.dart'; | 4 | import 'package:flutter/material.dart'; |
| 4 | 5 | ||
| @@ -22,6 +23,9 @@ class MyApp extends StatelessWidget { | @@ -22,6 +23,9 @@ class MyApp extends StatelessWidget { | ||
| 22 | @override | 23 | @override |
| 23 | Widget build(BuildContext context) { | 24 | Widget build(BuildContext context) { |
| 24 | return MaterialApp( | 25 | return MaterialApp( |
| 26 | + theme: ThemeData(platform: TargetPlatform.iOS), | ||
| 27 | + title: 'BottomSheet Modals', | ||
| 28 | + builder: (context, child) => WebFrame(child: child,), | ||
| 25 | onGenerateRoute: (RouteSettings settings) { | 29 | onGenerateRoute: (RouteSettings settings) { |
| 26 | switch (settings.name) { | 30 | switch (settings.name) { |
| 27 | case '/': | 31 | case '/': |
| @@ -36,6 +40,7 @@ class MyApp extends StatelessWidget { | @@ -36,6 +40,7 @@ class MyApp extends StatelessWidget { | ||
| 36 | builder: (context) => CupertinoPageScaffold( | 40 | builder: (context) => CupertinoPageScaffold( |
| 37 | backgroundColor: Colors.white, | 41 | backgroundColor: Colors.white, |
| 38 | navigationBar: CupertinoNavigationBar( | 42 | navigationBar: CupertinoNavigationBar( |
| 43 | + transitionBetweenRoutes: false, | ||
| 39 | middle: Text('Normal Navigation Presentation'), | 44 | middle: Text('Normal Navigation Presentation'), |
| 40 | trailing: GestureDetector( | 45 | trailing: GestureDetector( |
| 41 | child: Icon(Icons.arrow_upward), | 46 | child: Icon(Icons.arrow_upward), |
| @@ -95,6 +100,7 @@ class _MyHomePageState extends State<MyHomePage> { | @@ -95,6 +100,7 @@ class _MyHomePageState extends State<MyHomePage> { | ||
| 95 | child: CupertinoPageScaffold( | 100 | child: CupertinoPageScaffold( |
| 96 | backgroundColor: Colors.white, | 101 | backgroundColor: Colors.white, |
| 97 | navigationBar: CupertinoNavigationBar( | 102 | navigationBar: CupertinoNavigationBar( |
| 103 | + transitionBetweenRoutes: false, | ||
| 98 | middle: Text('iOS13 Modal Presentation'), | 104 | middle: Text('iOS13 Modal Presentation'), |
| 99 | trailing: GestureDetector( | 105 | trailing: GestureDetector( |
| 100 | child: Icon(Icons.arrow_forward), | 106 | child: Icon(Icons.arrow_forward), |
example/lib/web_frame.dart
0 → 100644
| 1 | +import 'package:flutter/cupertino.dart'; | ||
| 2 | +import 'package:flutter/foundation.dart'; | ||
| 3 | +import 'package:flutter/material.dart'; | ||
| 4 | +import 'package:flutter/rendering.dart'; | ||
| 5 | +import 'package:flutter/services.dart'; | ||
| 6 | +import 'package:url_launcher/url_launcher.dart'; | ||
| 7 | + | ||
| 8 | +class WebFrame extends StatelessWidget { | ||
| 9 | + final Widget child; | ||
| 10 | + | ||
| 11 | + const WebFrame({Key key, this.child}) : super(key: key); | ||
| 12 | + | ||
| 13 | + @override | ||
| 14 | + Widget build(BuildContext context) { | ||
| 15 | + if (kIsWeb && MediaQuery.of(context).size.width > 600) { | ||
| 16 | + final date = DateTime.now(); | ||
| 17 | + final MediaQueryData mediaQuery = MediaQueryData( | ||
| 18 | + size: Size(414, 896), | ||
| 19 | + padding: EdgeInsets.only( | ||
| 20 | + top: 44, | ||
| 21 | + bottom: 34, | ||
| 22 | + ), | ||
| 23 | + devicePixelRatio: 2, | ||
| 24 | + ); | ||
| 25 | + return Material( | ||
| 26 | + child: Padding( | ||
| 27 | + padding: EdgeInsets.all(60), | ||
| 28 | + child: Row( | ||
| 29 | + mainAxisAlignment: MainAxisAlignment.center, | ||
| 30 | + crossAxisAlignment: CrossAxisAlignment.stretch, | ||
| 31 | + children: <Widget>[ | ||
| 32 | + Flexible( | ||
| 33 | + flex: 2, | ||
| 34 | + key: Key('Preview'), | ||
| 35 | + child: FittedBox( | ||
| 36 | + fit: BoxFit.contain, | ||
| 37 | + child: Builder(builder: (context) { | ||
| 38 | + final device = MediaQuery( | ||
| 39 | + data: mediaQuery, | ||
| 40 | + child: Container( | ||
| 41 | + width: mediaQuery.size.width, | ||
| 42 | + height: mediaQuery.size.height, | ||
| 43 | + alignment: Alignment.center, | ||
| 44 | + child: Stack( | ||
| 45 | + fit: StackFit.expand, | ||
| 46 | + children: <Widget>[ | ||
| 47 | + child, | ||
| 48 | + Positioned( | ||
| 49 | + top: 0, | ||
| 50 | + left: 0, | ||
| 51 | + right: 0, | ||
| 52 | + height: 44, | ||
| 53 | + child: Row( | ||
| 54 | + mainAxisAlignment: | ||
| 55 | + MainAxisAlignment.spaceBetween, | ||
| 56 | + children: <Widget>[ | ||
| 57 | + Padding( | ||
| 58 | + padding: EdgeInsets.only(left: 30, top: 4), | ||
| 59 | + child: Text( | ||
| 60 | + '${date.hour}:${date.minute}', | ||
| 61 | + style: TextStyle( | ||
| 62 | + fontWeight: FontWeight.bold), | ||
| 63 | + )), | ||
| 64 | + Padding( | ||
| 65 | + padding: EdgeInsets.only(right: 18), | ||
| 66 | + child: Row( | ||
| 67 | + children: <Widget>[ | ||
| 68 | + Icon( | ||
| 69 | + Icons.signal_cellular_4_bar, | ||
| 70 | + size: 14, | ||
| 71 | + ), | ||
| 72 | + SizedBox(width: 4), | ||
| 73 | + Icon(Icons.wifi, size: 16), | ||
| 74 | + SizedBox(width: 4), | ||
| 75 | + Icon( | ||
| 76 | + CupertinoIcons.battery_charging, | ||
| 77 | + size: 20) | ||
| 78 | + ], | ||
| 79 | + )) | ||
| 80 | + ], | ||
| 81 | + ), | ||
| 82 | + ), | ||
| 83 | + Align( | ||
| 84 | + alignment: Alignment.bottomCenter, | ||
| 85 | + child: Container( | ||
| 86 | + margin: EdgeInsets.only(bottom: 8), | ||
| 87 | + height: 4, | ||
| 88 | + width: 140, | ||
| 89 | + decoration: BoxDecoration( | ||
| 90 | + color: Colors.black, | ||
| 91 | + borderRadius: BorderRadius.circular(4)), | ||
| 92 | + ), | ||
| 93 | + ) | ||
| 94 | + ], | ||
| 95 | + )), | ||
| 96 | + ); | ||
| 97 | + | ||
| 98 | + return Container( | ||
| 99 | + child: ClipRRect( | ||
| 100 | + clipBehavior: Clip.antiAlias, | ||
| 101 | + borderRadius: BorderRadius.circular(38.5), | ||
| 102 | + child: device), | ||
| 103 | + decoration: BoxDecoration( | ||
| 104 | + borderRadius: BorderRadius.circular(50), | ||
| 105 | + border: Border.all(color: Colors.black, width: 12)), | ||
| 106 | + ); | ||
| 107 | + }), | ||
| 108 | + ), | ||
| 109 | + ), | ||
| 110 | + SizedBox(width: 80), | ||
| 111 | + Flexible( | ||
| 112 | + flex: 1, | ||
| 113 | + child: FittedBox( | ||
| 114 | + fit: BoxFit.scaleDown, | ||
| 115 | + child: Container( | ||
| 116 | + padding: EdgeInsets.only(bottom: 40), | ||
| 117 | + width: mediaQuery.size.width, | ||
| 118 | + height: mediaQuery.size.height, | ||
| 119 | + alignment: Alignment.center, | ||
| 120 | + child: Column( | ||
| 121 | + crossAxisAlignment: CrossAxisAlignment.stretch, | ||
| 122 | + children: <Widget>[ | ||
| 123 | + Expanded( | ||
| 124 | + child: Text( | ||
| 125 | + 'Modal\nBottom\nSheet', | ||
| 126 | + style: TextStyle( | ||
| 127 | + fontWeight: FontWeight.w600, | ||
| 128 | + fontSize: 80, | ||
| 129 | + ), | ||
| 130 | + maxLines: 3, | ||
| 131 | + overflow: TextOverflow.clip, | ||
| 132 | + )), | ||
| 133 | + Spacer(), | ||
| 134 | + Row(children: <Widget>[ | ||
| 135 | + InkWell( | ||
| 136 | + onTap: () => launch('https://pub.dev/packages/modal_bottom_sheet'), | ||
| 137 | + child: Image.asset('assets/flutter.png', height: 60), | ||
| 138 | + ), | ||
| 139 | + Spacer(), | ||
| 140 | + InkWell( | ||
| 141 | + onTap: () => launch('https://github.com/jamesblasco/modal_bottom_sheet'), | ||
| 142 | + child: Image.asset('assets/github.png', height: 60), | ||
| 143 | + ), | ||
| 144 | + ],) | ||
| 145 | + ], | ||
| 146 | + )))) | ||
| 147 | + ], | ||
| 148 | + ), | ||
| 149 | + ), | ||
| 150 | + ); | ||
| 151 | + } else { | ||
| 152 | + return child; | ||
| 153 | + } | ||
| 154 | + } | ||
| 155 | +} |
| @@ -7,42 +7,42 @@ packages: | @@ -7,42 +7,42 @@ packages: | ||
| 7 | name: archive | 7 | name: archive |
| 8 | url: "https://pub.dartlang.org" | 8 | url: "https://pub.dartlang.org" |
| 9 | source: hosted | 9 | source: hosted |
| 10 | - version: "2.0.11" | 10 | + version: "2.0.13" |
| 11 | args: | 11 | args: |
| 12 | dependency: transitive | 12 | dependency: transitive |
| 13 | description: | 13 | description: |
| 14 | name: args | 14 | name: args |
| 15 | url: "https://pub.dartlang.org" | 15 | url: "https://pub.dartlang.org" |
| 16 | source: hosted | 16 | source: hosted |
| 17 | - version: "1.5.2" | 17 | + version: "1.6.0" |
| 18 | async: | 18 | async: |
| 19 | dependency: transitive | 19 | dependency: transitive |
| 20 | description: | 20 | description: |
| 21 | name: async | 21 | name: async |
| 22 | url: "https://pub.dartlang.org" | 22 | url: "https://pub.dartlang.org" |
| 23 | source: hosted | 23 | source: hosted |
| 24 | - version: "2.4.0" | 24 | + version: "2.4.1" |
| 25 | boolean_selector: | 25 | boolean_selector: |
| 26 | dependency: transitive | 26 | dependency: transitive |
| 27 | description: | 27 | description: |
| 28 | name: boolean_selector | 28 | name: boolean_selector |
| 29 | url: "https://pub.dartlang.org" | 29 | url: "https://pub.dartlang.org" |
| 30 | source: hosted | 30 | source: hosted |
| 31 | - version: "1.0.5" | 31 | + version: "2.0.0" |
| 32 | charcode: | 32 | charcode: |
| 33 | dependency: transitive | 33 | dependency: transitive |
| 34 | description: | 34 | description: |
| 35 | name: charcode | 35 | name: charcode |
| 36 | url: "https://pub.dartlang.org" | 36 | url: "https://pub.dartlang.org" |
| 37 | source: hosted | 37 | source: hosted |
| 38 | - version: "1.1.2" | 38 | + version: "1.1.3" |
| 39 | collection: | 39 | collection: |
| 40 | dependency: transitive | 40 | dependency: transitive |
| 41 | description: | 41 | description: |
| 42 | name: collection | 42 | name: collection |
| 43 | url: "https://pub.dartlang.org" | 43 | url: "https://pub.dartlang.org" |
| 44 | source: hosted | 44 | source: hosted |
| 45 | - version: "1.14.11" | 45 | + version: "1.14.12" |
| 46 | convert: | 46 | convert: |
| 47 | dependency: transitive | 47 | dependency: transitive |
| 48 | description: | 48 | description: |
| @@ -56,7 +56,7 @@ packages: | @@ -56,7 +56,7 @@ packages: | ||
| 56 | name: crypto | 56 | name: crypto |
| 57 | url: "https://pub.dartlang.org" | 57 | url: "https://pub.dartlang.org" |
| 58 | source: hosted | 58 | source: hosted |
| 59 | - version: "2.1.3" | 59 | + version: "2.1.4" |
| 60 | cupertino_icons: | 60 | cupertino_icons: |
| 61 | dependency: "direct main" | 61 | dependency: "direct main" |
| 62 | description: | 62 | description: |
| @@ -74,13 +74,18 @@ packages: | @@ -74,13 +74,18 @@ packages: | ||
| 74 | description: flutter | 74 | description: flutter |
| 75 | source: sdk | 75 | source: sdk |
| 76 | version: "0.0.0" | 76 | version: "0.0.0" |
| 77 | + flutter_web_plugins: | ||
| 78 | + dependency: transitive | ||
| 79 | + description: flutter | ||
| 80 | + source: sdk | ||
| 81 | + version: "0.0.0" | ||
| 77 | image: | 82 | image: |
| 78 | dependency: transitive | 83 | dependency: transitive |
| 79 | description: | 84 | description: |
| 80 | name: image | 85 | name: image |
| 81 | url: "https://pub.dartlang.org" | 86 | url: "https://pub.dartlang.org" |
| 82 | source: hosted | 87 | source: hosted |
| 83 | - version: "2.1.4" | 88 | + version: "2.1.12" |
| 84 | matcher: | 89 | matcher: |
| 85 | dependency: transitive | 90 | dependency: transitive |
| 86 | description: | 91 | description: |
| @@ -96,12 +101,12 @@ packages: | @@ -96,12 +101,12 @@ packages: | ||
| 96 | source: hosted | 101 | source: hosted |
| 97 | version: "1.1.8" | 102 | version: "1.1.8" |
| 98 | modal_bottom_sheet: | 103 | modal_bottom_sheet: |
| 99 | - dependency: "direct dev" | 104 | + dependency: "direct main" |
| 100 | description: | 105 | description: |
| 101 | path: ".." | 106 | path: ".." |
| 102 | relative: true | 107 | relative: true |
| 103 | source: path | 108 | source: path |
| 104 | - version: "0.1.0" | 109 | + version: "0.1.3" |
| 105 | path: | 110 | path: |
| 106 | dependency: transitive | 111 | dependency: transitive |
| 107 | description: | 112 | description: |
| @@ -109,27 +114,27 @@ packages: | @@ -109,27 +114,27 @@ packages: | ||
| 109 | url: "https://pub.dartlang.org" | 114 | url: "https://pub.dartlang.org" |
| 110 | source: hosted | 115 | source: hosted |
| 111 | version: "1.6.4" | 116 | version: "1.6.4" |
| 112 | - pedantic: | 117 | + petitparser: |
| 113 | dependency: transitive | 118 | dependency: transitive |
| 114 | description: | 119 | description: |
| 115 | - name: pedantic | 120 | + name: petitparser |
| 116 | url: "https://pub.dartlang.org" | 121 | url: "https://pub.dartlang.org" |
| 117 | source: hosted | 122 | source: hosted |
| 118 | - version: "1.8.0+1" | ||
| 119 | - petitparser: | 123 | + version: "3.0.2" |
| 124 | + plugin_platform_interface: | ||
| 120 | dependency: transitive | 125 | dependency: transitive |
| 121 | description: | 126 | description: |
| 122 | - name: petitparser | 127 | + name: plugin_platform_interface |
| 123 | url: "https://pub.dartlang.org" | 128 | url: "https://pub.dartlang.org" |
| 124 | source: hosted | 129 | source: hosted |
| 125 | - version: "2.4.0" | 130 | + version: "1.0.2" |
| 126 | quiver: | 131 | quiver: |
| 127 | dependency: transitive | 132 | dependency: transitive |
| 128 | description: | 133 | description: |
| 129 | name: quiver | 134 | name: quiver |
| 130 | url: "https://pub.dartlang.org" | 135 | url: "https://pub.dartlang.org" |
| 131 | source: hosted | 136 | source: hosted |
| 132 | - version: "2.0.5" | 137 | + version: "2.1.3" |
| 133 | sky_engine: | 138 | sky_engine: |
| 134 | dependency: transitive | 139 | dependency: transitive |
| 135 | description: flutter | 140 | description: flutter |
| @@ -141,7 +146,7 @@ packages: | @@ -141,7 +146,7 @@ packages: | ||
| 141 | name: source_span | 146 | name: source_span |
| 142 | url: "https://pub.dartlang.org" | 147 | url: "https://pub.dartlang.org" |
| 143 | source: hosted | 148 | source: hosted |
| 144 | - version: "1.5.5" | 149 | + version: "1.7.0" |
| 145 | stack_trace: | 150 | stack_trace: |
| 146 | dependency: transitive | 151 | dependency: transitive |
| 147 | description: | 152 | description: |
| @@ -176,7 +181,7 @@ packages: | @@ -176,7 +181,7 @@ packages: | ||
| 176 | name: test_api | 181 | name: test_api |
| 177 | url: "https://pub.dartlang.org" | 182 | url: "https://pub.dartlang.org" |
| 178 | source: hosted | 183 | source: hosted |
| 179 | - version: "0.2.11" | 184 | + version: "0.2.15" |
| 180 | typed_data: | 185 | typed_data: |
| 181 | dependency: transitive | 186 | dependency: transitive |
| 182 | description: | 187 | description: |
| @@ -184,6 +189,34 @@ packages: | @@ -184,6 +189,34 @@ packages: | ||
| 184 | url: "https://pub.dartlang.org" | 189 | url: "https://pub.dartlang.org" |
| 185 | source: hosted | 190 | source: hosted |
| 186 | version: "1.1.6" | 191 | version: "1.1.6" |
| 192 | + url_launcher: | ||
| 193 | + dependency: "direct main" | ||
| 194 | + description: | ||
| 195 | + name: url_launcher | ||
| 196 | + url: "https://pub.dartlang.org" | ||
| 197 | + source: hosted | ||
| 198 | + version: "5.4.2" | ||
| 199 | + url_launcher_macos: | ||
| 200 | + dependency: transitive | ||
| 201 | + description: | ||
| 202 | + name: url_launcher_macos | ||
| 203 | + url: "https://pub.dartlang.org" | ||
| 204 | + source: hosted | ||
| 205 | + version: "0.0.1+4" | ||
| 206 | + url_launcher_platform_interface: | ||
| 207 | + dependency: transitive | ||
| 208 | + description: | ||
| 209 | + name: url_launcher_platform_interface | ||
| 210 | + url: "https://pub.dartlang.org" | ||
| 211 | + source: hosted | ||
| 212 | + version: "1.0.6" | ||
| 213 | + url_launcher_web: | ||
| 214 | + dependency: transitive | ||
| 215 | + description: | ||
| 216 | + name: url_launcher_web | ||
| 217 | + url: "https://pub.dartlang.org" | ||
| 218 | + source: hosted | ||
| 219 | + version: "0.1.1+1" | ||
| 187 | vector_math: | 220 | vector_math: |
| 188 | dependency: transitive | 221 | dependency: transitive |
| 189 | description: | 222 | description: |
| @@ -197,6 +230,7 @@ packages: | @@ -197,6 +230,7 @@ packages: | ||
| 197 | name: xml | 230 | name: xml |
| 198 | url: "https://pub.dartlang.org" | 231 | url: "https://pub.dartlang.org" |
| 199 | source: hosted | 232 | source: hosted |
| 200 | - version: "3.5.0" | 233 | + version: "3.7.0" |
| 201 | sdks: | 234 | sdks: |
| 202 | - dart: ">=2.4.0 <3.0.0" | 235 | + dart: ">=2.7.0 <3.0.0" |
| 236 | + flutter: ">=1.12.8 <2.0.0" |
| @@ -19,6 +19,9 @@ environment: | @@ -19,6 +19,9 @@ environment: | ||
| 19 | dependencies: | 19 | dependencies: |
| 20 | flutter: | 20 | flutter: |
| 21 | sdk: flutter | 21 | sdk: flutter |
| 22 | + url_launcher: ^5.4.2 | ||
| 23 | + modal_bottom_sheet: | ||
| 24 | + path: '../' | ||
| 22 | 25 | ||
| 23 | 26 | ||
| 24 | # The following adds the Cupertino Icons font to your application. | 27 | # The following adds the Cupertino Icons font to your application. |
| @@ -28,8 +31,6 @@ dependencies: | @@ -28,8 +31,6 @@ dependencies: | ||
| 28 | dev_dependencies: | 31 | dev_dependencies: |
| 29 | flutter_test: | 32 | flutter_test: |
| 30 | sdk: flutter | 33 | sdk: flutter |
| 31 | - modal_bottom_sheet: | ||
| 32 | - path: '../' | ||
| 33 | 34 | ||
| 34 | # For information on the generic Dart part of this file, see the | 35 | # For information on the generic Dart part of this file, see the |
| 35 | # following page: https://dart.dev/tools/pub/pubspec | 36 | # following page: https://dart.dev/tools/pub/pubspec |
| @@ -42,6 +43,8 @@ flutter: | @@ -42,6 +43,8 @@ flutter: | ||
| 42 | # the material Icons class. | 43 | # the material Icons class. |
| 43 | uses-material-design: true | 44 | uses-material-design: true |
| 44 | 45 | ||
| 46 | + assets: | ||
| 47 | + - assets/ | ||
| 45 | # To add assets to your application, add an assets section, like this: | 48 | # To add assets to your application, add an assets section, like this: |
| 46 | # assets: | 49 | # assets: |
| 47 | # - images/a_dot_burr.jpeg | 50 | # - images/a_dot_burr.jpeg |
example/web/icons/image.png
0 → 100644
609 KB
| @@ -3,7 +3,24 @@ | @@ -3,7 +3,24 @@ | ||
| 3 | <head> | 3 | <head> |
| 4 | <meta charset="UTF-8"> | 4 | <meta charset="UTF-8"> |
| 5 | <meta content="IE=Edge" http-equiv="X-UA-Compatible"> | 5 | <meta content="IE=Edge" http-equiv="X-UA-Compatible"> |
| 6 | - <meta name="description" content="A new Flutter project."> | 6 | + <!-- Primary Meta Tags --> |
| 7 | + <title>Flutter Modal Bottom Sheets</title> | ||
| 8 | + <meta name="title" content="Flutter Modal Bottom Sheets"> | ||
| 9 | + <meta name="description" content="Build advanced modals. Cupertino, material or create your own"> | ||
| 10 | + | ||
| 11 | + <!-- Open Graph / Facebook --> | ||
| 12 | + <meta property="og:type" content="website"> | ||
| 13 | + <meta property="og:url" content="https://jamesblasco.github.io/modal_bottom_sheet/"> | ||
| 14 | + <meta property="og:title" content="Flutter Modal Bottom Sheets"> | ||
| 15 | + <meta property="og:description" content="Build advanced modals. Cupertino, material or create your own"> | ||
| 16 | + <meta property="og:image" content="https://jamesblasco.github.io/modal_bottom_sheet/icons/image.png"> | ||
| 17 | + | ||
| 18 | + <!-- Twitter --> | ||
| 19 | + <meta property="twitter:card" content="summary_large_image"> | ||
| 20 | + <meta property="twitter:url" content="https://jamesblasco.github.io/modal_bottom_sheet/"> | ||
| 21 | + <meta property="twitter:title" content="Flutter Modal Bottom Sheets"> | ||
| 22 | + <meta property="twitter:description" content="Build advanced modals. Cupertino, material or create your own"> | ||
| 23 | + <meta property="og:image" content="https://jamesblasco.github.io/modal_bottom_sheet/icons/image.png"> | ||
| 7 | 24 | ||
| 8 | <!-- iOS meta tags & icons --> | 25 | <!-- iOS meta tags & icons --> |
| 9 | <meta name="apple-mobile-web-app-capable" content="yes"> | 26 | <meta name="apple-mobile-web-app-capable" content="yes"> |
| @@ -14,7 +31,6 @@ | @@ -14,7 +31,6 @@ | ||
| 14 | <!-- Favicon --> | 31 | <!-- Favicon --> |
| 15 | <link rel="shortcut icon" type="image/png" href="/favicon.png"/> | 32 | <link rel="shortcut icon" type="image/png" href="/favicon.png"/> |
| 16 | 33 | ||
| 17 | - <title>example</title> | ||
| 18 | <link rel="manifest" href="/manifest.json"> | 34 | <link rel="manifest" href="/manifest.json"> |
| 19 | </head> | 35 | </head> |
| 20 | <body> | 36 | <body> |
| @@ -178,7 +178,7 @@ class _CupertinoModalTransition extends StatelessWidget { | @@ -178,7 +178,7 @@ class _CupertinoModalTransition extends StatelessWidget { | ||
| 178 | Widget build(BuildContext context) { | 178 | Widget build(BuildContext context) { |
| 179 | double startRoundCorner = 0; | 179 | double startRoundCorner = 0; |
| 180 | final paddingTop = MediaQuery.of(context).padding.top; | 180 | final paddingTop = MediaQuery.of(context).padding.top; |
| 181 | - if (defaultTargetPlatform == TargetPlatform.iOS && paddingTop > 20) { | 181 | + if (Theme.of(context).platform == TargetPlatform.iOS && paddingTop > 20) { |
| 182 | startRoundCorner = 38.5; | 182 | startRoundCorner = 38.5; |
| 183 | //https://kylebashour.com/posts/finding-the-real-iphone-x-corner-radius | 183 | //https://kylebashour.com/posts/finding-the-real-iphone-x-corner-radius |
| 184 | } | 184 | } |
-
Please register or login to post a comment