48 lines
1.2 KiB
Dart
Executable File
48 lines
1.2 KiB
Dart
Executable File
import 'package:flutter/material.dart';
|
|
|
|
|
|
class Help extends StatefulWidget {
|
|
@override
|
|
_Help createState() => _Help();
|
|
}
|
|
|
|
class _Help extends State<Help> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: new Text(
|
|
"帮助"
|
|
),
|
|
),
|
|
body: new Center(
|
|
child: new RaisedButton(
|
|
child: new Text("点我"),
|
|
onPressed: () {
|
|
showDialog(
|
|
context: context,
|
|
builder: (BuildContext context) {
|
|
return SimpleDialog(
|
|
title: new Text("测试"),
|
|
children: <Widget>[
|
|
SimpleDialogOption(
|
|
child: new Image.asset(
|
|
"lib/static/img/logo.png",
|
|
width: 80.0,
|
|
height: 80.0,
|
|
fit: BoxFit.cover,
|
|
),
|
|
),
|
|
SimpleDialogOption(
|
|
child: const Text('你好2'),
|
|
),
|
|
],
|
|
);
|
|
},
|
|
);
|
|
},
|
|
),
|
|
),
|
|
);
|
|
}
|
|
} |