import
'package:flutter/material.dart'
;
import
'package:flutter_color_plugin/flutter_color_plugin.dart'
;
class PluginUse extends StatelessWidget {
@override
Widget build(BuildContext context) {
return
MaterialApp(
title:
'如何使用Flutter包和插件?'
,
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key,
this
.title}) :
super
(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return
Scaffold(
appBar: AppBar(
title: Text(
'如何使用Flutter包和插件?'
),
leading: GestureDetector(
onTap: () {
Navigator.pop(context);
},
child: Icon(Icons.arrow_back),
),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'You have pushed the button this many times:'
,
style: TextStyle(color: ColorUtil.color(
'#a9ee00'
)),
),
],
),
),
);
}
}