1
|
Before Width: | Height: | Size: 415 KiB After Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 7.9 KiB |
@@ -7,7 +7,6 @@ import 'package:plan/router/routes.dart';
|
||||
import 'package:plan/theme/theme.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
|
||||
void main() {
|
||||
runApp(
|
||||
MultiProvider(
|
||||
|
||||
@@ -54,8 +54,11 @@ class _PlanFormCardState extends State<PlanFormCard> {
|
||||
controller: _inputController,
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
maxLength: 40,
|
||||
maxLines: 5,
|
||||
minLines: 1,
|
||||
expands: false,
|
||||
decoration: InputDecoration(
|
||||
hintText: "Clean the kitchen",
|
||||
hintText: "Just finished eating and l'm gonna go wash the dishes",
|
||||
fillColor: Theme.of(context).colorScheme.surfaceContainerLow,
|
||||
filled: true,
|
||||
enabledBorder: OutlineInputBorder(
|
||||
|
||||
@@ -20,9 +20,9 @@ class _ProfileSectionState extends State<ProfileSection> {
|
||||
final TextEditingController _inputController = TextEditingController();
|
||||
|
||||
final List<String> _tips = [
|
||||
"Whenever your coach creates a plan for you, they’ll start by looking at this information.",
|
||||
"The more details you share, the better your coach can tailor steps that fit your unique situation.",
|
||||
"You can also add requests here — for example, ‘I don’t eat cilantro.",
|
||||
"When your coach makes a plan for you,they'll check this info first.",
|
||||
"The more details you toss in,the better your coach can tailor steps to match your totally unique situation.",
|
||||
"You can also let your coach know here,like,Chocolate is a no-go for me 'cause I'm allergic",
|
||||
];
|
||||
|
||||
//防抖
|
||||
@@ -78,7 +78,8 @@ class _ProfileSectionState extends State<ProfileSection> {
|
||||
style: TextStyle(fontSize: 14, letterSpacing: 1),
|
||||
onChanged: _onTextChanged,
|
||||
decoration: InputDecoration(
|
||||
hintText: "I’m 19 and always use a dishwasher. Please don’t follow the hand-wash disassembly steps.",
|
||||
hintText:
|
||||
"I'm a busy office worker who relies on a rice cooker every day-could you skip the steps for cooking rice in a regular pot?",
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.grey), // 普通状态
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:plan/page/plan/detail/viewmodel/plan_detail_store.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class DoneStamp extends StatefulWidget {
|
||||
const DoneStamp({super.key});
|
||||
@@ -10,30 +12,39 @@ class DoneStamp extends StatefulWidget {
|
||||
class _DoneStampState extends State<DoneStamp> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Align(
|
||||
alignment: Alignment(0.7, -0.3),
|
||||
child: Transform.rotate(
|
||||
angle: -0.4,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 3, horizontal: 5),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
border: Border.all(color: Colors.red, width: 5),
|
||||
),
|
||||
child: DefaultTextStyle(
|
||||
style: TextStyle(color: Colors.red),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
"Completed",
|
||||
style: TextStyle(fontWeight: FontWeight.w700),
|
||||
return Consumer<PlanDetailStore>(
|
||||
builder: (context, store, _) {
|
||||
//是否全部完成
|
||||
bool allDone = store.planDetail.stepsList.every((item) => item.stepStatus == 2);
|
||||
if (!allDone || store.planDetail.stepsList.isEmpty) {
|
||||
return Container();
|
||||
}
|
||||
return Align(
|
||||
alignment: Alignment(0.7, -0.3),
|
||||
child: Transform.rotate(
|
||||
angle: -0.4,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 3, horizontal: 5),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
border: Border.all(color: Colors.red, width: 5),
|
||||
),
|
||||
child: DefaultTextStyle(
|
||||
style: TextStyle(color: Colors.red),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
"Completed",
|
||||
style: TextStyle(fontWeight: FontWeight.w700),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,6 +162,7 @@ class PlanDetailStore extends ChangeNotifier {
|
||||
steps: planDetail.stepsList,
|
||||
suggestions: planDetail.suggestionsList,
|
||||
);
|
||||
planContent = "";
|
||||
await getPlanDetail();
|
||||
EasyLoading.showToast("Plan created!");
|
||||
}
|
||||
|
||||
@@ -12,24 +12,28 @@ class CoachMessage extends StatefulWidget {
|
||||
class _CoachMessageState extends State<CoachMessage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var store = context.read<PlanDetailStore>();
|
||||
if (store.planContent.isEmpty) {
|
||||
return SizedBox();
|
||||
}
|
||||
return Container(
|
||||
padding: EdgeInsets.all(20),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
"Organizing your plan…",
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
return Selector<PlanDetailStore, String>(
|
||||
selector: (_, store) => store.planContent,
|
||||
builder: (context, planContent, _) {
|
||||
if (planContent.isEmpty) {
|
||||
return SizedBox();
|
||||
}
|
||||
return Container(
|
||||
padding: EdgeInsets.all(20),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
"Organizing your plan…",
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
),
|
||||
Text(
|
||||
'"$planContent"',
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
'"${store.planContent}"',
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||