Commit 57cb9373 authored by jinzhu's avatar jinzhu

update

parent 80c34f87
...@@ -6,10 +6,32 @@ class HomePage extends StatefulWidget { ...@@ -6,10 +6,32 @@ class HomePage extends StatefulWidget {
} }
class _HomePageState extends State<HomePage> { 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return new Scaffold(
color: Colors.red, 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: ...@@ -29,6 +29,13 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.14.11" 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: cupertino_icons:
dependency: "direct main" dependency: "direct main"
description: description:
...@@ -36,6 +43,13 @@ packages: ...@@ -36,6 +43,13 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.1.2" version: "0.1.2"
dio:
dependency: "direct main"
description:
name: dio
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.3"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
......
...@@ -20,6 +20,8 @@ dependencies: ...@@ -20,6 +20,8 @@ dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
dio: ^2.1.0
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2 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