基本完成除了详情
This commit is contained in:
93
lib/page/home/widget/plan_form_card.dart
Normal file
93
lib/page/home/widget/plan_form_card.dart
Normal file
@@ -0,0 +1,93 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PlanFormCard extends StatefulWidget {
|
||||
const PlanFormCard({super.key});
|
||||
|
||||
@override
|
||||
State<PlanFormCard> createState() => _PlanFormCardState();
|
||||
}
|
||||
|
||||
class _PlanFormCardState extends State<PlanFormCard> {
|
||||
final TextEditingController _inputController = TextEditingController();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Stack(
|
||||
alignment: Alignment.topCenter,
|
||||
children: [
|
||||
Positioned(
|
||||
top: 56,
|
||||
child: SizedBox(
|
||||
height: 100,
|
||||
child: Image.asset("assets/image/xiaozhi.png"),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 40),
|
||||
margin: EdgeInsets.only(top: 120),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.black, width: 2),
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
color: Colors.white,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Color(0xffb5b5b5),
|
||||
blurRadius: 2,
|
||||
offset: Offset(6, 6),
|
||||
spreadRadius: 0,
|
||||
blurStyle: BlurStyle.normal,
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(bottom: 20),
|
||||
child: Text("有什么事情你一直在拖延?"),
|
||||
),
|
||||
TextField(
|
||||
controller: _inputController,
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
decoration: InputDecoration(
|
||||
hintText: "我躺在床上听歌",
|
||||
fillColor: Theme.of(context).colorScheme.surfaceContainerLow,
|
||||
filled: true,
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
width: 1,
|
||||
color: Theme.of(context).colorScheme.surfaceContainerHigh,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 20),
|
||||
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 20),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
border: Border.all(color: Colors.black, width: 1.5),
|
||||
),
|
||||
child: Text(
|
||||
"创建计划",
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
60
lib/page/home/widget/quote_card.dart
Normal file
60
lib/page/home/widget/quote_card.dart
Normal file
@@ -0,0 +1,60 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:remixicon/remixicon.dart';
|
||||
|
||||
class QuoteCard extends StatefulWidget {
|
||||
const QuoteCard({super.key});
|
||||
|
||||
@override
|
||||
State<QuoteCard> createState() => _QuoteCardState();
|
||||
}
|
||||
|
||||
class _QuoteCardState extends State<QuoteCard> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(top: 20),
|
||||
padding: const EdgeInsets.all(3),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.black, width: 2),
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 2,
|
||||
color: Theme.of(context).colorScheme.surfaceContainerHigh,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"每个教练都有什么特长?",
|
||||
style: Theme.of(context).textTheme.titleSmall,
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10),
|
||||
child: Text(
|
||||
"在主页点击教练可以查看介绍",
|
||||
style: Theme.of(context).textTheme.labelMedium,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10),
|
||||
child: Row(
|
||||
spacing: 5,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(RemixIcons.arrow_right_circle_line, size: 18),
|
||||
Text("下一条", style: Theme.of(context).textTheme.bodySmall),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user