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

M3-128 그룹 검색 화면 만들기 #10

Merged
merged 12 commits into from
Jun 27, 2024
11 changes: 11 additions & 0 deletions lib/controllers/group_controller.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import 'package:get/get.dart';

import '../widgets/searched_group.dart';


class GroupController extends GetxController{

SearchedGroup searchedGroup = SearchedGroup();


}
23 changes: 20 additions & 3 deletions lib/screens/group_screen.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import 'search_group_screen.dart';

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

@override
Widget build(BuildContext context) {
return const Column(
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text('그룹'),
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const SearchGroupScreen(),),
);
},
child: const Text('그룹검색'),
),
],
),
],
);
}
Expand Down
54 changes: 54 additions & 0 deletions lib/screens/search_group_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import 'package:flutter/material.dart';

import '../widgets/searched_group.dart';

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

@override
Widget build(BuildContext context) {
SearchedGroup searchedGroup = SearchedGroup();

return Scaffold(
appBar: AppBar(
title: Row(
children: [
const SizedBox(width: 8),
const Flexible(
flex: 1,
child: TextField(
decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric(
vertical: 7,
horizontal: 16,
),
),
),
),
IconButton(
onPressed: () {},
icon: const Icon(
Icons.search,
color: Colors.black,
),
),
],
),
),
body: Column(
children: [
Expanded(
child: ListView(
padding: const EdgeInsets.all(10),
children: [
searchedGroup.searchedGroup('홍익대학교'),
searchedGroup.searchedGroup('홍익대학교 세종캠'),
searchedGroup.searchedGroup('홍익대학교 부속고등학교'),
],
),
),
],
),
);
}
}
1 change: 1 addition & 0 deletions lib/service/ios_walking_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ class IosWalkingService implements WalkingService {

return dailySteps;
}

}
1 change: 1 addition & 0 deletions lib/utils/walking_service.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
abstract class WalkingService {

Future<int> getCurrentStep();

Future<List<int>> getDailyStepsInInterval(
Expand Down
15 changes: 15 additions & 0 deletions lib/widgets/searched_group.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import 'package:flutter/material.dart';


class SearchedGroup {
Widget searchedGroup(String groupName){
return Container(
height: 50,
color: Colors.white70,
child: Center(
child: Text(groupName),
),
);
}
}