diff --git a/example/lib/main.dart b/example/lib/main.dart index 5a73a60..6e33696 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,17 +1,17 @@ import 'package:flutter/material.dart'; import 'package:gradient_app_bar/gradient_app_bar.dart'; -void main() => runApp(new MyApp()); +void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { - return new MaterialApp( + return MaterialApp( title: 'Flutter Demo', - theme: new ThemeData( + theme: ThemeData( primarySwatch: Colors.blue, ), - home: new MyHomePage(title: 'Flutter Demo Home Page'), + home: MyHomePage(title: 'Flutter Demo Home Page'), ); } } @@ -22,7 +22,7 @@ class MyHomePage extends StatefulWidget { final String title; @override - _MyHomePageState createState() => new _MyHomePageState(); + _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State { @@ -38,11 +38,10 @@ class _MyHomePageState extends State { Widget build(BuildContext context) { return DefaultTabController( length: 2, - child: new Scaffold( - appBar: new GradientAppBar( - title: new Text(widget.title), - backgroundColorStart: Colors.blue, - backgroundColorEnd: Colors.red, + child: Scaffold( + appBar: GradientAppBar( + title: Text(widget.title), + gradient: LinearGradient(colors: [Colors.red, Colors.purple]), bottom: TabBar(tabs: [ Tab( icon: Icon(Icons.home), @@ -54,24 +53,24 @@ class _MyHomePageState extends State { ) ]), ), - body: new Center( - child: new Column( + body: Center( + child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - new Text( + Text( 'You have pushed the button this many times:', ), - new Text( + Text( '$_counter', style: Theme.of(context).textTheme.display1, ), ], ), ), - floatingActionButton: new FloatingActionButton( + floatingActionButton: FloatingActionButton( onPressed: _incrementCounter, tooltip: 'Increment', - child: new Icon(Icons.add), + child: Icon(Icons.add), backgroundColor: Colors.red, ), ), diff --git a/example/pubspec.lock b/example/pubspec.lock index da90d33..3ecb8d0 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -1,5 +1,5 @@ # Generated by pub -# See https://www.dartlang.org/tools/pub/glossary#lockfile +# See https://dart.dev/tools/pub/glossary#lockfile packages: async: dependency: transitive @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.2.0" boolean_selector: dependency: transitive description: @@ -52,14 +52,14 @@ packages: name: gradient_app_bar url: "https://pub.dartlang.org" source: hosted - version: "0.0.1" + version: "0.1.0" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.3+1" + version: "0.12.5" meta: dependency: transitive description: @@ -80,14 +80,14 @@ packages: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.4.0" + version: "1.7.0" quiver: dependency: transitive description: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.3" sky_engine: dependency: transitive description: flutter @@ -99,7 +99,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.5.4" + version: "1.5.5" stack_trace: dependency: transitive description: @@ -113,7 +113,7 @@ packages: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "1.6.8" + version: "2.0.0" string_scanner: dependency: transitive description: @@ -134,7 +134,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.2" + version: "0.2.5" typed_data: dependency: transitive description: @@ -150,4 +150,4 @@ packages: source: hosted version: "2.0.8" sdks: - dart: ">=2.1.0 <3.0.0" + dart: ">=2.2.2 <3.0.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 5f569cb..552b9d0 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -10,7 +10,7 @@ description: A new Flutter project. version: 1.0.0+1 dependencies: - gradient_app_bar: ^0.0.1 + gradient_app_bar: ^0.1.0 flutter: sdk: flutter