bar
This commit is contained in:
parent
0bb1c71b87
commit
0eb19dcf2a
@ -19,6 +19,7 @@ class MyTheme {
|
|||||||
static const Color grayBg = Color(0xFFEEEEEE);
|
static const Color grayBg = Color(0xFFEEEEEE);
|
||||||
static const Color white = Color(0xFFFFFFFF);
|
static const Color white = Color(0xFFFFFFFF);
|
||||||
static const Color accent = Color(0xFF0071FF);
|
static const Color accent = Color(0xFF0071FF);
|
||||||
|
static const Color accent50 = Color(0x770071FF);
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/huangjianke/flutter_easyloading
|
// https://github.com/huangjianke/flutter_easyloading
|
||||||
|
@ -19,6 +19,7 @@ class RemotePage extends StatefulWidget {
|
|||||||
// https://github.com/hanxu317317/flutter_plan_demo/blob/master/lib/src/enter.dart
|
// https://github.com/hanxu317317/flutter_plan_demo/blob/master/lib/src/enter.dart
|
||||||
class _RemotePageState extends State<RemotePage> {
|
class _RemotePageState extends State<RemotePage> {
|
||||||
Timer _interval;
|
Timer _interval;
|
||||||
|
bool _show_bar = true;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@ -50,15 +51,64 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
// Size size = MediaQueryData.fromWindow(ui.window).size;
|
// Size size = MediaQueryData.fromWindow(ui.window).size;
|
||||||
// MediaQuery.of(context).size.height;
|
// MediaQuery.of(context).size.height;
|
||||||
return FlutterEasyLoading(
|
return Scaffold(
|
||||||
child: InteractiveViewer(
|
floatingActionButton: _show_bar
|
||||||
constrained: false,
|
? null
|
||||||
panEnabled: true,
|
: FloatingActionButton(
|
||||||
onInteractionUpdate: (details) {
|
mini: true,
|
||||||
print("$details");
|
child: Icon(Icons.expand_less),
|
||||||
},
|
backgroundColor: MyTheme.accent50,
|
||||||
child: Container(child: ImagePaint(), color: MyTheme.grayBg),
|
onPressed: () {
|
||||||
));
|
setState(() => _show_bar = !_show_bar);
|
||||||
|
}),
|
||||||
|
bottomNavigationBar: _show_bar
|
||||||
|
? BottomAppBar(
|
||||||
|
color: MyTheme.accent,
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: <Widget>[
|
||||||
|
Row(children: [
|
||||||
|
IconButton(
|
||||||
|
color: Colors.white,
|
||||||
|
icon: Icon(Icons.clear),
|
||||||
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
color: Colors.white,
|
||||||
|
icon: Icon(Icons.keyboard),
|
||||||
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
color: Colors.white,
|
||||||
|
icon: Icon(Icons.tv),
|
||||||
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
color: Colors.white,
|
||||||
|
icon: Icon(Icons.settings),
|
||||||
|
onPressed: () {},
|
||||||
|
)
|
||||||
|
]),
|
||||||
|
IconButton(
|
||||||
|
color: Colors.white,
|
||||||
|
icon: Icon(Icons.expand_more),
|
||||||
|
onPressed: () {
|
||||||
|
setState(() => _show_bar = !_show_bar);
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: null,
|
||||||
|
body: FlutterEasyLoading(
|
||||||
|
child: InteractiveViewer(
|
||||||
|
constrained: false,
|
||||||
|
panEnabled: true,
|
||||||
|
onInteractionUpdate: (details) {
|
||||||
|
print("$details");
|
||||||
|
},
|
||||||
|
child: Container(child: ImagePaint(), color: MyTheme.grayBg),
|
||||||
|
)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user