Commit 57cb9373 authored by jinzhu's avatar jinzhu

update

parent 80c34f87
......@@ -6,10 +6,32 @@ class HomePage extends StatefulWidget {
}
class _HomePageState extends State<HomePage> {
void _incrementCounter() {
setState(() {
// This call to setState tells the Flutter framework that
// something has changed in this State, which causes it to rerun
// the build method below so that the display can reflect the
// updated values. If we changed _counter without calling
// setState(), then the build method would not be called again,
// and so nothing would appear to happen.
});
@override
Widget build(BuildContext context) {
return Container(
color: Colors.red,
return new Scaffold(
appBar: new AppBar(
// Here we take the value from the MyHomePage object that
// was created by the App.build method, and use it to set
// our appbar title.
title: new Text('网络请求'),
),
body: new Center(
child: new RaisedButton(
onPressed: _incrementCounter,
color: Colors.blue[400],
child: new Text('RaisedButton',style: new TextStyle(color: Colors.white))),
),
);
}
}
\ No newline at end of file
......@@ -29,6 +29,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.14.11"
cookie_jar:
dependency: transitive
description:
name: cookie_jar
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.0"
cupertino_icons:
dependency: "direct main"
description:
......@@ -36,6 +43,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.2"
dio:
dependency: "direct main"
description:
name: dio
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.3"
flutter:
dependency: "direct main"
description: flutter
......
......@@ -20,6 +20,8 @@ dependencies:
flutter:
sdk: flutter
dio: ^2.1.0
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment