|
//  |
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
void main() => runApp(MyApp()); |
|
|
|
/// This Widget is the main application widget. |
|
class MyApp extends StatelessWidget { |
|
static const String _title = 'Flutter Code Sample'; |
|
|
|
@override |
|
Widget build(BuildContext context) { |
|
return MaterialApp( |
|
title: _title, |
|
home: Scaffold( |
|
appBar: AppBar(title: const Text(_title)), |
|
body: Center( |
|
child: MyStatefulWidget(), |
|
), |
|
), |
|
); |
|
} |
|
} |
|
|
|
class MyStatefulWidget extends StatefulWidget { |
|
MyStatefulWidget({Key key}) : super(key: key); |
|
|
|
@override |
|
_MyStatefulWidgetState createState() => _MyStatefulWidgetState(); |
|
} |
|
|
|
class _MyStatefulWidgetState extends State<MyStatefulWidget> { |
|
@override |
|
Widget build(BuildContext context) { |
|
return Container( |
|
width: 326.0, |
|
padding: EdgeInsets.only(top: 0.0, right: 12.0, bottom: 0.0, left: 12.0), |
|
child: DropdownButton<String>( |
|
hint: Text('どの段階で中止しますか? *'), |
|
icon: Icon( |
|
Icons.arrow_drop_down, |
|
color: Colors.grey[400], |
|
), |
|
isExpanded: true, |
|
iconSize: 24, |
|
style: TextStyle(color: Colors.grey[900]), |
|
underline: Container( |
|
height: 0, |
|
), |
|
onChanged: (String value) {}, |
|
items: <String>['出発前', 'お店に向かう途中', 'お会計前', 'お届け先に向かう途中', 'お届け時'] |
|
.map<DropdownMenuItem<String>>((String value) { |
|
return DropdownMenuItem<String>( |
|
value: value, |
|
child: Text( |
|
value, |
|
), |
|
); |
|
}).toList(), |
|
), |
|
decoration: ShapeDecoration( |
|
shape: RoundedRectangleBorder( |
|
side: BorderSide( |
|
width: 2.0, |
|
style: BorderStyle.solid, |
|
color: Colors.green[500], |
|
), |
|
borderRadius: BorderRadius.all(Radius.circular(4.0)), |
|
), |
|
), |
|
); |
|
} |
|
} |