Commit 6caf2a54 by Mobile : Art

updateHistory

parent 8f889b4a
...@@ -5,12 +5,9 @@ ...@@ -5,12 +5,9 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="c1439925-efc2-4fdb-a5ea-1a37e7dbf139" name="Default Changelist" comment=""> <list default="true" id="c1439925-efc2-4fdb-a5ea-1a37e7dbf139" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/lib/screen/history/history_page.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/components/appbar_logo.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/components/appbar_logo.dart" afterDir="false" /> <change beforePath="$PROJECT_DIR$/lib/screen/notification/notification_page.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/screen/notification/notification_page.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/components/appbar_title.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/components/appbar_title.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/screen/home/home_page.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/screen/home/home_page.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/screen/login/login_page.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/screen/login/login_page.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/screen/news/news_page.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/screen/news/news_page.dart" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
...@@ -72,22 +69,22 @@ ...@@ -72,22 +69,22 @@
<servers /> <servers />
</component> </component>
<component name="WindowStateProjectService"> <component name="WindowStateProjectService">
<state width="1398" height="223" key="GridCell.Tab.0.bottom" timestamp="1646883497738"> <state width="1398" height="223" key="GridCell.Tab.0.bottom" timestamp="1646884541383">
<screen x="0" y="25" width="1440" height="875" /> <screen x="0" y="25" width="1440" height="875" />
</state> </state>
<state width="1398" height="223" key="GridCell.Tab.0.bottom/0.25.1440.875@0.25.1440.875" timestamp="1646883497738" /> <state width="1398" height="223" key="GridCell.Tab.0.bottom/0.25.1440.875@0.25.1440.875" timestamp="1646884541383" />
<state width="1398" height="223" key="GridCell.Tab.0.center" timestamp="1646883497737"> <state width="1398" height="223" key="GridCell.Tab.0.center" timestamp="1646884541382">
<screen x="0" y="25" width="1440" height="875" /> <screen x="0" y="25" width="1440" height="875" />
</state> </state>
<state width="1398" height="223" key="GridCell.Tab.0.center/0.25.1440.875@0.25.1440.875" timestamp="1646883497737" /> <state width="1398" height="223" key="GridCell.Tab.0.center/0.25.1440.875@0.25.1440.875" timestamp="1646884541382" />
<state width="1398" height="223" key="GridCell.Tab.0.left" timestamp="1646883497736"> <state width="1398" height="223" key="GridCell.Tab.0.left" timestamp="1646884541382">
<screen x="0" y="25" width="1440" height="875" /> <screen x="0" y="25" width="1440" height="875" />
</state> </state>
<state width="1398" height="223" key="GridCell.Tab.0.left/0.25.1440.875@0.25.1440.875" timestamp="1646883497736" /> <state width="1398" height="223" key="GridCell.Tab.0.left/0.25.1440.875@0.25.1440.875" timestamp="1646884541382" />
<state width="1398" height="223" key="GridCell.Tab.0.right" timestamp="1646883497737"> <state width="1398" height="223" key="GridCell.Tab.0.right" timestamp="1646884541383">
<screen x="0" y="25" width="1440" height="875" /> <screen x="0" y="25" width="1440" height="875" />
</state> </state>
<state width="1398" height="223" key="GridCell.Tab.0.right/0.25.1440.875@0.25.1440.875" timestamp="1646883497737" /> <state width="1398" height="223" key="GridCell.Tab.0.right/0.25.1440.875@0.25.1440.875" timestamp="1646884541383" />
<state x="229" y="98" key="SettingsEditor" timestamp="1646880884868"> <state x="229" y="98" key="SettingsEditor" timestamp="1646880884868">
<screen x="0" y="25" width="1440" height="875" /> <screen x="0" y="25" width="1440" height="875" />
</state> </state>
......
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:nbt_app/components/appbar_logo.dart';
class HistoryPage extends StatefulWidget {
const HistoryPage({Key? key}) : super(key: key);
@override
_HistoryPageState createState() => _HistoryPageState();
}
class _HistoryPageState extends State<HistoryPage> {
@override
Widget build(BuildContext context) {
ScreenUtil.init(
BoxConstraints(
maxWidth: MediaQuery.of(context).size.width,
maxHeight: MediaQuery.of(context).size.height),
designSize: Size(360, 690),
context: context,
minTextAdapt: true,
orientation: Orientation.portrait);
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
elevation: 0.55,
shadowColor: Color.fromRGBO(77, 32, 126, 1),
bottomOpacity: 0,
backgroundColor: Color.fromRGBO(77, 32, 126, 1),
toolbarHeight: 80.h,
title: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(top: 10),
child: GestureDetector(
onTap: () {
setState(() {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) => AppBarLogo()));
// Navigator.pop(context);
});
},
child: Icon(Icons.arrow_back_ios),
),
),
SizedBox(
width: 115,
),
Container(
margin: EdgeInsets.only(top: 10),
child: Text(
'ประวัติการรับชม',
style: TextStyle(
fontSize: 30,
letterSpacing: 1,
fontWeight: FontWeight.w700,
// color: Color.fromRGBO(77, 32, 126, 1),
color: Colors.white,
fontFamily: 'DBHeavent'),
),
)
],
),
),
body: Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child: Stack(alignment: AlignmentDirectional.topStart, children: [
Container(
color: Color.fromRGBO(77, 32, 126, 1),
height: 60.h,
),
ListView.separated(
scrollDirection: Axis.vertical,
itemBuilder: (context, index) {
return buildCard(item: listitem[index]);
},
separatorBuilder: (context, position) => SizedBox(
height: 10,
),
itemCount: listitem.length),
]),
),
));
}
}
Widget buildCard({required Model item}) => Container(
child: Column(
children: [
Container(
height: 100,
width: 385,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.14),
spreadRadius: 0.5,
blurRadius: 6,
offset: Offset(0, 3))
]),
child: Row(
children: [
SizedBox(
width: 10,
),
Container(
width: 125,
height: 80,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
image: DecorationImage(
image: NetworkImage(item.image), fit: BoxFit.cover)),
),
SizedBox(
width: 15,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
// height: 70,
padding: EdgeInsets.only(top: 10),
width: 200,
// color: Colors.red,
child: Text(
item.title,
maxLines: 2,
softWrap: true,
style: TextStyle(
fontSize: 22,
letterSpacing: 1,
fontWeight: FontWeight.w700,
// color: Color.fromRGBO(77, 32, 126, 1),
color: Colors.black,
fontFamily: 'DBHeavent'),
),
),
Container(
margin: EdgeInsets.only(top: 5),
child: Text(
item.time,
style: TextStyle(
fontSize: 18,
letterSpacing: 1,
fontWeight: FontWeight.w500,
color: Color.fromRGBO(77, 32, 126, 1),
// color: Colors.white,
fontFamily: 'DBHeavent'),
),
)
],
),
Container(
margin: EdgeInsets.only(top: 10, left: 5),
alignment: Alignment.topRight,
child: Icon(
Icons.clear,
color: Colors.grey,
),
),
],
),
)
],
),
);
class Model {
String image, title, time;
Model({required this.image, required this.title, required this.time});
}
List<Model> listitem = [
Model(
image:
'https://images.unsplash.com/photo-1645894183288-9c43d07958fa?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw2Mnx8fGVufDB8fHx8&auto=format&fit=crop&w=600&q=60',
title: 'รายการคุยถึงแก่นได้ Update วิดีโอตอนใหม่แล้ว',
time: '15 นาทีที่ผ่านมา'),
Model(
image:
'https://images.unsplash.com/photo-1645894183288-9c43d07958fa?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw2Mnx8fGVufDB8fHx8&auto=format&fit=crop&w=600&q=60',
title: 'รายการคุยถึงแก่นได้ Update วิดีโอตอนใหม่แล้ว',
time: '15 นาทีที่ผ่านมา'),
Model(
image:
'https://images.unsplash.com/photo-1645894183288-9c43d07958fa?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw2Mnx8fGVufDB8fHx8&auto=format&fit=crop&w=600&q=60',
title: 'รายการคุยถึงแก่นได้ Update วิดีโอตอนใหม่แล้ว',
time: '15 นาทีที่ผ่านมา'),
Model(
image:
'https://images.unsplash.com/photo-1645894183288-9c43d07958fa?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw2Mnx8fGVufDB8fHx8&auto=format&fit=crop&w=600&q=60',
title: 'รายการคุยถึงแก่นได้ Update วิดีโอตอนใหม่แล้ว',
time: '15 นาทีที่ผ่านมา',
),
];
...@@ -120,15 +120,15 @@ Widget buildCard({required Model item}) => Container( ...@@ -120,15 +120,15 @@ Widget buildCard({required Model item}) => Container(
image: NetworkImage(item.image), fit: BoxFit.cover)), image: NetworkImage(item.image), fit: BoxFit.cover)),
), ),
SizedBox( SizedBox(
width: 15, width: 5,
), ),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
height: 70, // height: 70,
padding: EdgeInsets.only(top: 7), padding: EdgeInsets.only(top: 10),
width: 220, width: 200,
// color: Colors.red, // color: Colors.red,
child: Text( child: Text(
item.title, item.title,
...@@ -144,7 +144,7 @@ Widget buildCard({required Model item}) => Container( ...@@ -144,7 +144,7 @@ Widget buildCard({required Model item}) => Container(
), ),
), ),
Container( Container(
margin: EdgeInsets.only(top: 0), margin: EdgeInsets.only(top: 5),
child: Text( child: Text(
item.time, item.time,
style: TextStyle( style: TextStyle(
...@@ -157,7 +157,7 @@ Widget buildCard({required Model item}) => Container( ...@@ -157,7 +157,7 @@ Widget buildCard({required Model item}) => Container(
), ),
) )
], ],
) ),
], ],
), ),
) )
......
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