-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/widgets/search_box.dart issues : #13
- Loading branch information
Showing
3 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:frontend/widgets/custom_app_bar.dart'; | ||
import 'package:frontend/colors/app_colors.dart'; | ||
import 'package:frontend/widgets/custom_bottom_navigation_bar.dart'; | ||
import 'package:frontend/widgets/home_recommend_list.dart'; | ||
import 'package:frontend/widgets/search_box.dart'; | ||
|
||
class SearchPage extends StatefulWidget { | ||
const SearchPage({super.key}); | ||
|
||
@override | ||
_SearchPageState createState() => _SearchPageState(); | ||
} | ||
|
||
class _SearchPageState extends State<SearchPage> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return const Scaffold( | ||
appBar: CustomAppBar(), | ||
backgroundColor: AppColors.backgroundColor, | ||
body: SingleChildScrollView( | ||
child: Padding( | ||
padding: EdgeInsets.all(10.0), | ||
child: Column( | ||
children: [ | ||
Text('data'), | ||
SizedBox( | ||
height: 200, | ||
child: HomeRecommendList(), | ||
), | ||
SearchBox(), | ||
], | ||
), | ||
), | ||
), | ||
bottomNavigationBar: CustomBottomNavigationBar(), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class SearchBox extends StatefulWidget { | ||
const SearchBox({super.key}); | ||
|
||
@override | ||
_SearchBoxState createState() => _SearchBoxState(); | ||
} | ||
|
||
class _SearchBoxState extends State<SearchBox> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
child: Padding( | ||
padding: const EdgeInsets.all(16.0), | ||
child: Column( | ||
children: [ | ||
TextField( | ||
decoration: const InputDecoration( | ||
hintText: '다양한 컨텐츠들을 검색해보아요.', | ||
suffixIcon: Icon(Icons.search), | ||
border: OutlineInputBorder( | ||
borderRadius: BorderRadius.all(Radius.circular(10.0)), | ||
), | ||
), | ||
onChanged: (text) { | ||
// 검색어가 입력될 때 수행할 동작 | ||
}, | ||
), | ||
// 다른 위젯 추가 가능 | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |