Commit aa3d770e by Nuttee

update rewind screen ui

parent 5dc773f4
buildscript { buildscript {
ext.kotlin_version = '1.3.50' ext.kotlin_version = '1.6.10'
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
......
...@@ -5,6 +5,7 @@ import 'package:nbt_app/screen/catch%20up/catchup_page.dart'; ...@@ -5,6 +5,7 @@ import 'package:nbt_app/screen/catch%20up/catchup_page.dart';
import 'package:nbt_app/screen/login/login_page.dart'; import 'package:nbt_app/screen/login/login_page.dart';
import 'package:nbt_app/screen/news/news_page.dart'; import 'package:nbt_app/screen/news/news_page.dart';
import 'package:nbt_app/screen/notification/FavouriteList_Page.dart'; import 'package:nbt_app/screen/notification/FavouriteList_Page.dart';
import 'package:nbt_app/screen/rewind/rewind_search_page.dart';
class NBTDrawer extends StatefulWidget { class NBTDrawer extends StatefulWidget {
const NBTDrawer({ Key? key }) : super(key: key); const NBTDrawer({ Key? key }) : super(key: key);
...@@ -584,7 +585,14 @@ class _NBTDrawerState extends State<NBTDrawer> { ...@@ -584,7 +585,14 @@ class _NBTDrawerState extends State<NBTDrawer> {
SizedBox( SizedBox(
height: 10.h, height: 10.h,
), ),
Row( GestureDetector(
onTap: () {
setState(() {
Navigator.push(
context, MaterialPageRoute(builder: (context) => RewindSearchPage()));
});
},
child: Row(
children: [ children: [
SizedBox( SizedBox(
width: 20.w, width: 20.w,
...@@ -609,6 +617,7 @@ class _NBTDrawerState extends State<NBTDrawer> { ...@@ -609,6 +617,7 @@ class _NBTDrawerState extends State<NBTDrawer> {
), ),
], ],
), ),
),
SizedBox( SizedBox(
height: 10.h, height: 10.h,
), ),
......
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:nbt_app/screen/home/home_page.dart';
class RewindSearchResultPage extends StatefulWidget {
const RewindSearchResultPage({ Key? key }) : super(key: key);
@override
State<RewindSearchResultPage> createState() => _RewindSearchResultPageState();
}
class _RewindSearchResultPageState extends State<RewindSearchResultPage> {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
elevation: 0,
shadowColor: Color.fromRGBO(77, 32, 126, 1),
bottomOpacity: 0,
backgroundColor: Color.fromRGBO(77, 32, 126, 1),
toolbarHeight: 80.h,
title: const Text('ดูย้อนหลัง',
style: TextStyle(fontFamily: 'DBHeavent',fontSize: 28),
),
centerTitle: true,
leading: GestureDetector(
onTap: (){
Navigator.pop(context);
},
child: Icon(
Icons.arrow_back_ios,
color: Colors.white,
),
),
),
body: SingleChildScrollView(
child: Column(
children: [
Stack(alignment: Alignment.topCenter,children: [
Container(
color: Color.fromRGBO(77, 32, 126, 1),
height: 60.h,
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Container(
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.1),
spreadRadius: 2,
blurRadius: 7,
offset: Offset(0,3)
)
]
),
child: Column(
children: [
SizedBox(
height: 20.0,
),
Padding(
padding: const EdgeInsets.only(right: 20.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.end,
children: [
Padding(
padding: const EdgeInsets.only(right: 10.0),
child: Text('เรียงตาม',
style: TextStyle(fontFamily: 'DBHeavent',fontSize: 18),
),
),
Container(
padding: EdgeInsets.only(left: 10.0,right: 10.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.0),
border: Border.all(
color: Color.fromRGBO(77, 32, 126, 1),
),
),
child: DropdownButtonHideUnderline(
child: DropdownButton(
icon: Icon(Icons.arrow_drop_down),
items: <String>[
'ยอดนิยม',
'แนะนำ',
'ก-ฮ , A-Z',
'ฮ-ก , Z-A'
].map<DropdownMenuItem<String>>((String value){
return DropdownMenuItem<String>(
value: value,
child: Text(
value,
style: TextStyle(fontFamily: 'DBHeavent',fontSize: 18),
),
);
}).toList(),
onChanged: (value) {
setState(() {
//_selectedValue = value.toString();
});
},
//value: _selectedValue,
hint: Text(
'ยอดนิยม',
style: TextStyle(fontFamily: 'DBHeavent',fontSize: 18),
),
),
),
),
],
),
),
SizedBox(
height: 20,
),
Container(
padding: EdgeInsets.only(left: 20.0,right: 20.0),
child: GridView.count(
crossAxisCount: 2,
shrinkWrap: true,
mainAxisSpacing: 10.0,
crossAxisSpacing: 8.0,
children: List.generate(cardItems.length, (index) {
return buildCardImage(item: cardItems[index]);
}
)
),
),
SizedBox(
height: 20,
),
],
),
),
),
),
],
),
]
),
),
),
);
}
}
\ No newline at end of file
...@@ -102,6 +102,13 @@ packages: ...@@ -102,6 +102,13 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
intl:
dependency: "direct main"
description:
name: intl
url: "https://pub.dartlang.org"
source: hosted
version: "0.17.0"
lints: lints:
dependency: transitive dependency: transitive
description: description:
......
...@@ -37,6 +37,7 @@ dependencies: ...@@ -37,6 +37,7 @@ dependencies:
dots_indicator: ^2.1.0 dots_indicator: ^2.1.0
carousel_slider: ^4.0.0 carousel_slider: ^4.0.0
smooth_page_indicator: ^1.0.0+2 smooth_page_indicator: ^1.0.0+2
intl: ^0.17.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment