Skip to content

Commit

Permalink
Updated example application
Browse files Browse the repository at this point in the history
  • Loading branch information
joostlek committed Jul 14, 2019
1 parent 6eb072b commit 5b5da25
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 27 deletions.
31 changes: 15 additions & 16 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -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'),
);
}
}
Expand All @@ -22,7 +22,7 @@ class MyHomePage extends StatefulWidget {
final String title;

@override
_MyHomePageState createState() => new _MyHomePageState();
_MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
Expand All @@ -38,11 +38,10 @@ class _MyHomePageState extends State<MyHomePage> {
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: <Widget>[
Tab(
icon: Icon(Icons.home),
Expand All @@ -54,24 +53,24 @@ class _MyHomePageState extends State<MyHomePage> {
)
]),
),
body: new Center(
child: new Column(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
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,
),
),
Expand Down
20 changes: 10 additions & 10 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Generated by pub
# See https://www.dartlang.org/tools/pub/glossary#lockfile
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
version: "2.2.0"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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"
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5b5da25

Please sign in to comment.