flutter 入门与实战

进入页面

  • 添加程序入口
  • 定义主题
  • 设置页面跳转路由
import 'package:douban_flutter/pages/app_page.dart';
import 'package:douban_flutter/pages/demo_page.dart';
import 'package:douban_flutter/pages/login_page.dart';
import 'package:douban_flutter/pages/register_page.dart';
import 'package:douban_flutter/pages/splash_page.dart';
import 'package:flutter/material.dart';
//flutter 程序在运行的时候,第一个执行的函数就是main()函数
void main() => runApp(MyApp());
/**
 * StatelessWidget表示界面以后不刷新
 */
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        //页面主题色
        primarySwatch: Colors.yellow,
      ),
      //home对应的是应用程序首页
      home: SplashPage(),
      //添加页面跳转路由
      routes: {
        'LoginPage':(BuildContext context) => LoginPage(),
        'RegisterPage':(BuildContext context) => RegisterPage(),
        'AppPage':(BuildContext context) => AppPage(),
      },
    );
  }
}

From the Back Cover Explore what Flutter has to offer, where it came from, and where it’s going. Mobile development is progressing at a fast rate and with Flutter – an open-source mobile application development SDK created by Google – you can develop applications for Android and iOS, as well as Google Fuchsia. Learn to create three apps (a personal information manager, a chat system, and a game project) that you can install on your mobile devices and use for real. You will begin by getting a solid foundation of Flutter knowledge, and building on it immediately by constructing two more traditional productivity apps.. You will also learn to create a game, enabling you to see a whole other perspective on what Flutter can do. In addition to building these apps, you'll have the benefit of reviewing real-world issues you might encounter, along with ways to deal with them through tips and tricks, all designed to make your Flutter experience that much more productive and, frankly, fun! Practical Flutter will leave you with a solid grasp of how to build apps with Flutter, and springboard into creating more advanced apps on your own. By the time your journey through this material concludes, another larger one will begin as you springboard, well-prepared, into the larger world of Flutter development, tackling any project that comes your way with aplomb. Practical Flutter is a learning adventure you won't want to miss. About the Author Frank Zammetti is the author of 11 Apress titles on a variety of web and mobile development topics. He has over 25 years of experience as a developer. You can find him on Twitter @fzammetti.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值