Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add TimerModel.dart #11

Merged
merged 2 commits into from
May 20, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
ing
  • Loading branch information
forseaest committed May 19, 2022
commit 4e965bd2f4f30f3ec54d764a5d8821b446aba568
76 changes: 0 additions & 76 deletions lib/model/TimerModel.dart

This file was deleted.

180 changes: 105 additions & 75 deletions lib/pages/Diet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import 'package:flutter/material.dart';
import 'dart:ui';
import 'package:cloud_firestore/cloud_firestore.dart';

class Diet extends StatefulWidget {
const Diet({Key? key}) : super(key: key);
Expand Down Expand Up @@ -65,87 +66,116 @@ class _DietState extends State<Diet> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
CustomRadio("아침", 1),
SizedBox(width: 10),
CustomRadio("점심", 2),
SizedBox(width: 10),
CustomRadio("저녁", 3),
SizedBox(width: 10),
CustomRadio("간식", 4),
]),
),
Center(
child: Column(
children: <Widget>[
Container(
child: TextField(
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.bold,
fontFamily: 'Pretendard'),
textAlign: TextAlign.center,
decoration: InputDecoration(
hintText: '식단을 입력해주세요.',
enabledBorder: UnderlineInputBorder(
borderSide:
BorderSide(color: Color.fromARGB(255, 61, 67, 114)),
),
focusedBorder: UnderlineInputBorder(
borderSide:
BorderSide(color: Color.fromARGB(255, 61, 67, 114)),
body: SafeArea(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
child:
Row(mainAxisAlignment: MainAxisAlignment.center, children: [
CustomRadio("아침", 1),
SizedBox(width: 10),
CustomRadio("점심", 2),
SizedBox(width: 10),
CustomRadio("저녁", 3),
SizedBox(width: 10),
CustomRadio("간식", 4),
]),
),
Center(
child: Column(
children: <Widget>[
Container(
child: TextField(
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.bold,
fontFamily: 'Pretendard'),
textAlign: TextAlign.center,
decoration: InputDecoration(
hintText: '식단을 입력해주세요.',
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Color.fromARGB(255, 61, 67, 114)),
),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Color.fromARGB(255, 61, 67, 114)),
),
),
onChanged: (String str) {
setState(() => inputs = str);
},
),
padding: EdgeInsets.only(top: 30, bottom: 20),
width: 200,
),
onChanged: (String str) {
setState(() => inputs = str);
},
),
padding: EdgeInsets.only(top: 50, bottom: 50),
width: 200,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
_icon(0, Icons.sentiment_very_satisfied),
SizedBox(width: 5),
_icon(
1,
Icons.sentiment_satisfied,
),
SizedBox(width: 5),
_icon(
2,
Icons.sentiment_very_dissatisfied,
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
_icon(0, Icons.sentiment_very_satisfied),
SizedBox(width: 5),
_icon(
1,
Icons.sentiment_satisfied,
),
SizedBox(width: 5),
_icon(
2,
Icons.sentiment_very_dissatisfied,
),
],
),
SizedBox(height: 30),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
ElevatedButton.icon(
icon: Icon(Icons.add),
onPressed: () {},
label: Text('삭제'),
style: ElevatedButton.styleFrom(
fixedSize: const Size(100, 45),
primary: Color(0xffbbbbbb),
elevation: 0.0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
textStyle: const TextStyle(
fontWeight: FontWeight.bold,
fontFamily: 'Pretendard',
fontSize: 15),
),
),
const SizedBox(
width: 25,
),
ElevatedButton.icon(
icon: Icon(Icons.add),
onPressed: () {},
label: Text('추가'),
style: ElevatedButton.styleFrom(
fixedSize: const Size(100, 45),
primary: Color(0xff19335A),
elevation: 0.0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
textStyle: const TextStyle(
fontWeight: FontWeight.bold,
fontFamily: 'Pretendard',
fontSize: 15),
),
),
],
)
],
mainAxisAlignment: MainAxisAlignment.center,
),
SizedBox(height: 40),
ElevatedButton(
onPressed: () {},
child: const Text('+ 추가'),
style: ElevatedButton.styleFrom(
fixedSize: const Size(100, 45),
primary: Color.fromARGB(255, 61, 67, 114),
elevation: 0.0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
textStyle: const TextStyle(
fontWeight: FontWeight.bold,
fontFamily: 'Pretendard',
fontSize: 15),
),
),
],
mainAxisAlignment: MainAxisAlignment.center,
),
),
],
),
],
),
),
));
);
}
}
Loading