Skip to content

Instantly share code, notes, and snippets.

@kakobayashi
Created June 7, 2019 01:00
Show Gist options
  • Select an option

  • Save kakobayashi/6d9023b3f8623b187901934be5bd4459 to your computer and use it in GitHub Desktop.

Select an option

Save kakobayashi/6d9023b3f8623b187901934be5bd4459 to your computer and use it in GitHub Desktop.
RaisedButton(
onPressed: () {
showDialog(
context: context,
builder: (context) {
return SimpleDialog(
children: <Widget>[
// コンテンツ領域
Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
"Widget Text",
style: TextStyle(
color: Colors.blueAccent,
fontSize: 26.0,
fontWeight: FontWeight.w700,
),
),
SizedBox(height: 8.0),
Text(
"Wiodget Text",
style: TextStyle(
color: Colors.grey,
fontSize: 22.0,
fontWeight: FontWeight.w700,
),
),
SizedBox(height: 8.0),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
FlutterLogo(
size: 130.0,
),
FlutterLogo(
size: 130.0,
colors: Colors.yellow,
),
],
),
SizedBox(height: 16.0),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
FlutterLogo(
size: 130.0,
colors: Colors.red,
),
FlutterLogo(
size: 130.0,
colors: Colors.green,
),
],
),
SizedBox(height: 16.0),
Container(
height: 50,
width: double.infinity,
child: RaisedButton(
onPressed: () => Navigator.of(context).pop(),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(30.0)),
),
color: Colors.blue[800],
child: Text(
"OK",
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 18.0,
),
),
),
),
],
),
),
],
// 角丸
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.0),
),
);
},
);
},
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment