「Flutter/モジュール分割」の版間の差分
提供: 初心者エンジニアの簡易メモ
行10: | 行10: | ||
gallery/app.dart | gallery/app.dart | ||
<pre> | <pre> | ||
+ | import 'package:flutter/material.dart'; | ||
class GalleryApp extends StatefulWidget { | class GalleryApp extends StatefulWidget { | ||
@override | @override |
2019年4月30日 (火) 00:23時点における版
lib/main.dart
import 'package:flutter/material.dart'; import 'gallery/app.dart'; void main() { runApp(const GalleryApp()); }
gallery/app.dart
import 'package:flutter/material.dart'; class GalleryApp extends StatefulWidget { @override Widget build(BuildContext context) { return new MaterialApp( title: 'Hello Wolrd', home: new Scaffold( body: new Center( child: new Text('Hello World'), ), ), ); } }