[DART]界面构造

import 'package:flutter/material.dart';

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
  return new MaterialApp(
        title: '找谁呢',
        theme: new ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: new market(title: '登录'), //可以单独新建head,然后单独新建home来实现动态改变widget
      );
  }
}
class market extends StatefulWidget {
  //
  market({Key key, this.title}) : super(key: key);
  final String title;

  @override
  _market createState() => new _market();
}

class _market extends State {
  @override
    Widget build(BuildContext context) {
        return new Scaffold(
           appBar: new AppBar(
          title: const Text('Basic AppBar'),
           )
        );
    }
}

 

你可能感兴趣的:(FLUTTER)