facebook twitter hatena line google mixi email

Flutter/モジュール分割

提供: 初心者エンジニアの簡易メモ
移動: 案内検索

lib/main.dart

import 'helloworld/app.dart';
void main() => runApp(MyApp());

helloworld/app.dart

import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Hello Wolrd',
      home: new Scaffold(
        body: new Center(
          child: new Text('Hello World'),
        ),
      ),
    );
  }
}