登录流程已全部重构
This commit is contained in:
69
lib/pages/system/intro/intro_page.dart
Normal file
69
lib/pages/system/intro/intro_page.dart
Normal file
@@ -0,0 +1,69 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:food_health/l10n/l10n.dart';
|
||||
import 'package:food_health/router/config/route_paths.dart';
|
||||
import 'package:food_health/widgets/ui_kit/button/app_button.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
class IntroPage extends StatefulWidget {
|
||||
const IntroPage({super.key});
|
||||
|
||||
@override
|
||||
State<IntroPage> createState() => _IntroPageState();
|
||||
}
|
||||
|
||||
class _IntroPageState extends State<IntroPage> {
|
||||
void _onTap() {
|
||||
context.go(RoutePaths.login);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Colors.white,
|
||||
body: SafeArea(
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(50),
|
||||
child: Image.asset("assets/image/bg/intro_bg.png"),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(20),
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(bottom: 20),
|
||||
child: Text(
|
||||
L10n.of.welcome_title,
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
L10n.of.welcome_desc,
|
||||
style: Theme.of(context).textTheme.labelMedium,
|
||||
),
|
||||
Container(
|
||||
height: 50,
|
||||
margin: EdgeInsets.only(top: 20),
|
||||
child: AppButton(
|
||||
onPressed: _onTap,
|
||||
child: Text(L10n.of.welcome_button_text),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user