Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
NBT_APP
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2F-ART
NBT_APP
Commits
3fbbacce
Commit
3fbbacce
authored
Mar 17, 2022
by
Nuttee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update schedule ui screen
parent
aa3d770e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
403 additions
and
24 deletions
+403
-24
android/build.gradle
+1
-1
lib/components/drawer.dart
+31
-22
lib/main.dart
+1
-0
lib/screen/favorite/favouriteList_Page.dart
+5
-1
lib/screen/schedule/schedule_page.dart
+365
-0
No files found.
android/build.gradle
View file @
3fbbacce
buildscript
{
ext
.
kotlin_version
=
'1.
6.1
0'
ext
.
kotlin_version
=
'1.
3.5
0'
repositories
{
google
()
mavenCentral
()
...
...
lib/components/drawer.dart
View file @
3fbbacce
...
...
@@ -6,6 +6,7 @@ import 'package:nbt_app/screen/login/login_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/rewind/rewind_search_page.dart'
;
import
'package:nbt_app/screen/schedule/schedule_page.dart'
;
class
NBTDrawer
extends
StatefulWidget
{
const
NBTDrawer
({
Key
?
key
})
:
super
(
key:
key
);
...
...
@@ -621,30 +622,38 @@ class _NBTDrawerState extends State<NBTDrawer> {
SizedBox
(
height:
10
.
h
,
),
Row
(
children:
[
SizedBox
(
width:
20
.
w
,
),
Text
(
"ผังรายการ"
,
style:
TextStyle
(
GestureDetector
(
onTap:
()
{
setState
(()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
SchedulePage
()));
});
},
child:
Row
(
children:
[
SizedBox
(
width:
20
.
w
,
),
Text
(
"ผังรายการ"
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
'DBHeavent'
,
fontSize:
25
,
fontWeight:
FontWeight
.
w500
,
letterSpacing:
1
,
),
),
Spacer
(),
Icon
(
Icons
.
arrow_forward_ios_rounded
,
color:
Colors
.
white
,
fontFamily:
'DBHeavent'
,
fontSize:
25
,
fontWeight:
FontWeight
.
w500
,
letterSpacing:
1
,
),
),
Spacer
(),
Icon
(
Icons
.
arrow_forward_ios_rounded
,
color:
Colors
.
white
,
),
SizedBox
(
width:
20
.
w
,
),
],
SizedBox
(
width:
20
.
w
,
),
],
),
),
SizedBox
(
height:
10
.
h
,
...
...
lib/main.dart
View file @
3fbbacce
import
'package:flutter/material.dart'
;
import
'package:nbt_app/components/appbar_logo.dart'
;
import
'package:nbt_app/components/bottombar.dart'
;
import
'package:nbt_app/screen/favorite/favouriteList_Page.dart'
;
import
'package:nbt_app/screen/home/home_page.dart'
;
import
'package:nbt_app/screen/splashscreen/splashscreen_page.dart'
;
...
...
lib/screen/favorite/favouriteList_Page.dart
View file @
3fbbacce
...
...
@@ -184,7 +184,11 @@ class _FavouriteListPageState extends State<FavouriteListPage>
],
),
)
]))));
]
)
)
)
);
}
}
...
...
lib/screen/schedule/schedule_page.dart
0 → 100644
View file @
3fbbacce
import
'package:flutter/material.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'package:nbt_app/screen/favorite/favouriteList_Page.dart'
;
class
SchedulePage
extends
StatefulWidget
{
const
SchedulePage
({
Key
?
key
})
:
super
(
key:
key
);
@override
State
<
SchedulePage
>
createState
()
=>
_SchedulePageState
();
}
class
_SchedulePageState
extends
State
<
SchedulePage
>
with
SingleTickerProviderStateMixin
{
final
_dayTabs
=
<
Tab
>[
Tab
(
child:
Column
(
children:
[
Text
(
'เสาร์'
,
style:
TextStyle
(
fontFamily:
'DBHeavent'
),
),
Text
(
'1'
,
style:
TextStyle
(
fontFamily:
'DBHeavent'
),
)
]),
),
Tab
(
child:
Column
(
children:
[
Text
(
'อาทิตย์'
,
style:
TextStyle
(
fontFamily:
'DBHeavent'
),
),
Text
(
'2'
,
style:
TextStyle
(
fontFamily:
'DBHeavent'
),
)
]),
),
Tab
(
child:
Column
(
children:
[
Text
(
'จันทร์'
,
style:
TextStyle
(
fontFamily:
'DBHeavent'
),
),
Text
(
'3'
,
style:
TextStyle
(
fontFamily:
'DBHeavent'
),
)
]),
),
Tab
(
child:
Column
(
children:
[
Text
(
'อังคาร'
,
style:
TextStyle
(
fontFamily:
'DBHeavent'
),
),
Text
(
'4'
,
style:
TextStyle
(
fontFamily:
'DBHeavent'
),
)
]),
),
Tab
(
child:
Column
(
children:
[
Text
(
'พุธ'
,
style:
TextStyle
(
fontFamily:
'DBHeavent'
),
),
Text
(
'5'
,
style:
TextStyle
(
fontFamily:
'DBHeavent'
),
)
]),
),
Tab
(
child:
Column
(
children:
[
Text
(
'พฤหัสบดี'
,
style:
TextStyle
(
fontFamily:
'DBHeavent'
),
),
Text
(
'6'
,
style:
TextStyle
(
fontFamily:
'DBHeavent'
),
)
]),
),
Tab
(
child:
Column
(
children:
[
Text
(
'ศุกร์'
,
style:
TextStyle
(
fontFamily:
'DBHeavent'
),
),
Text
(
'7'
,
style:
TextStyle
(
fontFamily:
'DBHeavent'
),
)
]),
),
];
final
_tabPages
=
<
Widget
>[
Container
(
child:
ListView
.
builder
(
itemCount:
programsList
.
length
,
itemBuilder:
(
context
,
index
)
{
return
buildPrograms
(
data:
programsList
[
index
]
);
}
)
),
Container
(
child:
ListView
.
builder
(
itemCount:
programsList
.
length
,
itemBuilder:
(
context
,
index
)
{
return
buildPrograms
(
data:
programsList
[
index
]
);
}
)
),
Container
(
child:
ListView
.
builder
(
itemCount:
programsList
.
length
,
itemBuilder:
(
context
,
index
)
{
return
buildPrograms
(
data:
programsList
[
index
]
);
}
)
),
Container
(
child:
ListView
.
builder
(
itemCount:
programsList
.
length
,
itemBuilder:
(
context
,
index
)
{
return
buildPrograms
(
data:
programsList
[
index
]
);
}
)
),
Container
(
child:
ListView
.
builder
(
itemCount:
programsList
.
length
,
itemBuilder:
(
context
,
index
)
{
return
buildPrograms
(
data:
programsList
[
index
]
);
}
)
),
Container
(
child:
ListView
.
builder
(
itemCount:
programsList
.
length
,
itemBuilder:
(
context
,
index
)
{
return
buildPrograms
(
data:
programsList
[
index
]
);
}
)
),
Container
(
child:
ListView
.
builder
(
itemCount:
programsList
.
length
,
itemBuilder:
(
context
,
index
)
{
return
buildPrograms
(
data:
programsList
[
index
]
);
}
)
),
];
late
TabController
_tabcontroller
;
@override
void
initState
()
{
_tabcontroller
=
TabController
(
length:
_dayTabs
.
length
,
vsync:
this
);
super
.
initState
();
}
@override
void
dispose
()
{
_tabcontroller
.
dispose
();
super
.
dispose
();
}
@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:
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
,
height:
MediaQuery
.
of
(
context
).
size
.
height
,
child:
Stack
(
children:
[
Container
(
color:
Color
.
fromRGBO
(
77
,
32
,
126
,
1
),
height:
60
.
h
,
),
Container
(
padding:
EdgeInsets
.
only
(
top:
20
,
left:
20
,
right:
20
),
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
),
width:
400
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
10
),
boxShadow:
[
BoxShadow
(
color:
Colors
.
black
.
withOpacity
(
0.1
),
spreadRadius:
3
,
blurRadius:
6
)
]),
child:
Column
(
children:
[
Text
(
'มกราคม 2565'
,
style:
TextStyle
(
fontFamily:
'DBHeavent'
,
fontSize:
30
),
),
Container
(
padding:
EdgeInsets
.
only
(
left:
5
,
right:
5
,
top:
5
,
bottom:
5
),
height:
50
.
h
,
child:
TabBar
(
isScrollable:
true
,
labelColor:
Colors
.
red
,
unselectedLabelColor:
Color
.
fromRGBO
(
77
,
32
,
126
,
1
),
indicatorColor:
Colors
.
red
,
indicatorWeight:
2
,
// indicator: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.circular(5)),
controller:
_tabcontroller
,
tabs:
_dayTabs
),
),
Container
(
height:
MediaQuery
.
of
(
context
).
size
.
height
/
1.5
,
child:
TabBarView
(
controller:
_tabcontroller
,
children:
_tabPages
,
),
)
],
),
)
]
)
)
),
);
}
}
Widget
buildPrograms
(
{
required
Programs
data
})
=>
Container
(
padding:
EdgeInsets
.
only
(
top:
5.0
,
bottom:
5.0
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
const
Divider
(),
Row
(
children:
[
Text
(
data
.
startTime
,
style:
TextStyle
(
color:
Color
.
fromRGBO
(
161
,
159
,
163
,
1
),
fontSize:
18
,
fontFamily:
'DBHeavent'
),
),
Text
(
' - '
,
style:
TextStyle
(
color:
Color
.
fromRGBO
(
161
,
159
,
163
,
1
),
fontSize:
18
,
fontFamily:
'DBHeavent'
),
),
Text
(
data
.
endTime
,
style:
TextStyle
(
color:
Color
.
fromRGBO
(
161
,
159
,
163
,
1
),
fontSize:
18
,
fontFamily:
'DBHeavent'
),
),
],
),
Text
(
data
.
programName
,
style:
TextStyle
(
color:
Color
.
fromRGBO
(
161
,
159
,
163
,
1
),
fontSize:
24
,
fontFamily:
'DBHeavent'
),
),
],
),
);
class
Programs
{
String
startTime
,
endTime
,
programName
;
Programs
(
{
required
this
.
startTime
,
required
this
.
endTime
,
required
this
.
programName
}
);
}
List
<
Programs
>
programsList
=
[
Programs
(
startTime:
'04:00'
,
endTime:
'05:00'
,
programName:
'ประทีปธรรมนำชีวิต'
),
Programs
(
startTime:
'05:00'
,
endTime:
'06:30'
,
programName:
'NBT News ภาคเช้า'
),
Programs
(
startTime:
'06:30'
,
endTime:
'08:30'
,
programName:
'คุยถึงแก่น'
),
Programs
(
startTime:
'08:30'
,
endTime:
'09:00'
,
programName:
'สถานีศิริราช'
),
Programs
(
startTime:
'09:00'
,
endTime:
'12:00'
,
programName:
'NBT รวมใจสู้ภัยโควิด-19'
),
Programs
(
startTime:
'12:00'
,
endTime:
'14:00'
,
programName:
'NBT News ภาคเที่ยง'
),
Programs
(
startTime:
'14:30'
,
endTime:
'14:30'
,
programName:
'เกาะกระแสหุ้น'
),
];
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment