| 123456789101112131415161718192021222324252627282930313233 |
- import 'package:flutter/material.dart';
- import 'login_page.dart';
- class StartPage extends StatefulWidget {
- final Widget child;
- StartPage({Key key, this.child}) : super(key: key);
- _StartPageState createState() => _StartPageState();
- }
- class _StartPageState extends State<StartPage> {
- @override
- Widget build(BuildContext context) {
- return Container(
- child: Stack(
- alignment:Alignment.center,//如果子widget没有定位,此属性定位
- children: <Widget>[
- Container(
- child:Image.asset(
- "lib/images/start_page.png",//本地图片路径必须和配置文件的图片路径一致
- fit:BoxFit.cover
- )
- ),
- Positioned(
- top: 30.0,
- right: 10.0,
- child:Text("99",textDirection: TextDirection.ltr,)
- )
- ],
- )
- );
- }
- }
|