Skip to content

Commit

Permalink
✨Feat: appbar 업데이트
Browse files Browse the repository at this point in the history
  • Loading branch information
seochan99 committed Feb 18, 2024
1 parent 0c09625 commit c010fb6
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 22 deletions.
8 changes: 6 additions & 2 deletions lib/views/profile/profile_account/profile_account_screen.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:earlips/utilities/style/color_styles.dart';
import 'package:earlips/views/auth/auth_dialog.dart';
import 'package:earlips/views/base/default_back_appbar.dart';
import 'package:flutter/material.dart';

class ProfileAccountScreen extends StatelessWidget {
Expand All @@ -8,8 +9,11 @@ class ProfileAccountScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('계정 관리'),
appBar: const PreferredSize(
preferredSize: Size.fromHeight(kToolbarHeight),
child: DefaultBackAppbar(
title: "계정 관리",
),
),
body: Container(
color: ColorSystem.white,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:earlips/utilities/style/color_styles.dart';
import 'package:earlips/viewModels/user/user_viewmodel.dart';
import 'package:earlips/views/base/default_back_appbar.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:easy_localization/easy_localization.dart';
Expand All @@ -17,8 +18,11 @@ class ProfileLanguageScreen extends StatelessWidget {
String learningLanguage = tr('learning_language');

return Scaffold(
appBar: AppBar(
title: Text(title),
appBar: const PreferredSize(
preferredSize: Size.fromHeight(kToolbarHeight),
child: DefaultBackAppbar(
title: "언어 설정",
),
),
body: Container(
width: double.infinity,
Expand Down
9 changes: 0 additions & 9 deletions lib/views/profile/profile_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ class ProfileScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
// appBar: AppBar(
// backgroundColor: ColorSystem.background,
// //뒤로가기 화살표 없애기
// automaticallyImplyLeading: false,
// title: Container(
// alignment: Alignment.center,
// child: const Text('마이 페이지',
// style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500))),
// ),
body: SafeArea(
top: true,
child: Container(
Expand Down
20 changes: 11 additions & 9 deletions lib/views/script/create_script_screen.dart
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
import 'package:earlips/utilities/style/color_styles.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:earlips/viewModels/script/create_script_viewmodel.dart';
import 'package:get/get.dart';

class CreateScriptPage extends StatelessWidget {
const CreateScriptPage({super.key});

@override
Widget build(BuildContext context) {
return ChangeNotifierProvider<CreateScriptViewModel>(
create: (_) => CreateScriptViewModel(),
child: Consumer<CreateScriptViewModel>(
builder: (context, model, child) => Scaffold(
appBar: AppBar(
title: Text('대본으로 학습하기'),
title: const Text('대본으로 학습하기'),
centerTitle: true,
actions: <Widget>[
TextButton(
onPressed: model.complete,
child: Text(
child: const Text(
'완료',
style: TextStyle(
color: Colors.black,
Expand All @@ -35,7 +38,7 @@ class CreateScriptPage extends StatelessWidget {
Expanded(
flex: 1,
child: Padding(
padding: EdgeInsets.all(10.0),
padding: const EdgeInsets.all(10.0),
child: TextField(
controller: model.writedTextController,
expands: true,
Expand All @@ -56,9 +59,9 @@ class CreateScriptPage extends StatelessWidget {
Expanded(
flex: 1,
child: Padding(
padding: EdgeInsets.fromLTRB(25, 20, 25, 100),
padding: const EdgeInsets.fromLTRB(25, 20, 25, 100),
child: Container(
padding: EdgeInsets.all(20.0),
padding: const EdgeInsets.all(20.0),
width: Get.width * 0.8,
decoration: BoxDecoration(
color: Colors.white,
Expand All @@ -68,14 +71,14 @@ class CreateScriptPage extends StatelessWidget {
color: Colors.grey.withOpacity(0.5),
spreadRadius: 1,
blurRadius: 6,
offset: Offset(0, 3),
offset: const Offset(0, 3),
),
],
),
child: SingleChildScrollView(
child: Text(
model.voicedTextController.text,
style: TextStyle(fontSize: 16),
style: const TextStyle(fontSize: 16),
),
),
),
Expand All @@ -99,7 +102,7 @@ class CreateScriptPage extends StatelessWidget {
borderRadius: BorderRadius.circular(40),
onTap: model.toggleRecording,
child: Padding(
padding: EdgeInsets.all(20),
padding: const EdgeInsets.all(20),
child: Icon(
model.isRecording ? Icons.stop : Icons.mic,
size: 30,
Expand All @@ -117,4 +120,3 @@ class CreateScriptPage extends StatelessWidget {
);
}
}

0 comments on commit c010fb6

Please sign in to comment.