Commit e186364d authored by Izol's avatar Izol

#3

parent 64124429
......@@ -4,6 +4,7 @@ import 'dart:convert';
import 'dart:async';
import 'dart:io';
import 'dart:math';
import 'dart:ui';
import 'package:awesome_dialog/awesome_dialog.dart';
import 'package:otp_text_field/otp_field.dart';
......@@ -1273,213 +1274,182 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
return StatefulBuilder(builder: (context, StateSetter setState) {
return Container(
decoration: BoxDecoration(
image: const DecorationImage(
fit: BoxFit.cover,
image: AssetImage(
'assets/img_bg_card.png',
color: lightBackgroundColor
),
child: Stack(
children: [
BackdropFilter(
filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
child: Container(
color: Colors.black.withOpacity(0.2),
),
),
), ),
child:Center(
child: SingleChildScrollView(
child: AlertDialog(
backgroundColor: lightBackgroundColor,
title: Container(
padding: const EdgeInsets.symmetric(
horizontal: 20, vertical: 20),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(0),
image: const DecorationImage(
fit: BoxFit.cover,
image: AssetImage(
'assets/img_bg_card.png',
Center(
child: SingleChildScrollView(
child: AlertDialog(
backgroundColor: lightBackgroundColor,
title: Container(
padding: const EdgeInsets.symmetric(
horizontal: 20, vertical: 20),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(28),
image: const DecorationImage(
fit: BoxFit.cover,
image: AssetImage(
'assets/img_bg_card.png',
),
),
),
),
width: 1200,
margin:
const EdgeInsets.symmetric(vertical: 10, horizontal: 0),
child: Row(
children: [
Align(
alignment: Alignment.topLeft,
child: GestureDetector(
onTap: () {
Navigator.pop(context);
setState(() {
isShowingDialog = false;
});
if (timer != null) timer?.cancel();
tapIdle();
},
child: Icon(
Icons.arrow_back,
size: 32,
color: lightBackgroundColor,
width: 1100,
margin:
const EdgeInsets.symmetric(vertical: 10, horizontal: 0),
child: Row(
children: [
Align(
alignment: Alignment.topLeft,
child: GestureDetector(
onTap: () {
Navigator.pop(context);
setState(() {
isShowingDialog = false;
});
if (timer != null) timer?.cancel();
tapIdle();
},
child: Icon(
Icons.arrow_back,
size: 32,
color: lightBackgroundColor,
),
),
),
),
SizedBox(
width: 480,
),
Text(
'Isi Ulang Saldo',
style: blackTextStyle.copyWith(
fontSize: 25,
color: Colors.white,
fontWeight: bold,
letterSpacing: 2,
SizedBox(
width: 400,
),
textAlign: TextAlign.center,
),
],
Text(
'Isi Ulang Saldo',
style: blackTextStyle.copyWith(
fontSize: 25,
color: Colors.white,
fontWeight: bold,
letterSpacing: 2,
),
textAlign: TextAlign.center,
),
],
),
),
),
content: Container (
child: ListBody(
content: Container (
child: ListBody(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Center(
child: Text(
'topup balance',
style: greyTextStyle.copyWith(
fontSize: 15,
fontStyle: FontStyle.italic,
fontWeight: light,
),
),
),
Text(
'Pilih nominal isi ulang',
style: blackTextStyle.copyWith(
fontSize: 20,
fontWeight: bold,
),
),
Text(
'Choose topup amount',
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Center(
child: Text(
'topup balance',
style: greyTextStyle.copyWith(
fontSize: 15,
fontStyle: FontStyle.italic,
fontWeight: light,
),
),
SizedBox(
height: 20,
),
Text(
'Pilih nominal isi ulang',
style: blackTextStyle.copyWith(
fontSize: 20,
fontWeight: bold,
),
Row(
children: [
Expanded(
child: GestureDetector(
onTap: () {
if (timer != null) timer?.cancel();
tapIdle();
),
Text(
'Choose topup amount',
style: greyTextStyle.copyWith(
fontSize: 15,
fontStyle: FontStyle.italic,
fontWeight: light,
),
),
SizedBox(
height: 20,
),
Row(
children: [
Expanded(
child: GestureDetector(
onTap: () {
if (timer != null) timer?.cancel();
tapIdle();
if (mounted) {
setState(() {
amountController!.text = cTopUp1;
});
}
},
child: Container(
padding:
EdgeInsets.symmetric(vertical: 15),
decoration: BoxDecoration(
border: Border.all(
color: amountController!.text ==
cTopUp1
? purpleColor
: Colors.black12),
borderRadius: BorderRadius.circular(7),
),
child: Center(
child: Text("50,000",
style: blackTextStyle.copyWith(
fontSize: 25,
fontWeight: bold,
)),
),
if (mounted) {
setState(() {
amountController!.text = cTopUp1;
});
}
},
child: Container(
padding:
EdgeInsets.symmetric(vertical: 15),
decoration: BoxDecoration(
border: Border.all(
color: amountController!.text ==
cTopUp1
? purpleColor
: Colors.black12),
borderRadius: BorderRadius.circular(7),
),
)),
SizedBox(
width: 10,
),
Expanded(
child: GestureDetector(
onTap: () {
if (timer != null) timer?.cancel();
tapIdle();
if (mounted) {
setState(() {
amountController!.text = cTopUp2;
});
}
},
child: Container(
padding:
EdgeInsets.symmetric(vertical: 15),
decoration: BoxDecoration(
border: Border.all(
color: (amountController!.text ==
cTopUp2)
? Color(0xff005DAC)
: Colors.black12),
borderRadius: BorderRadius.circular(7),
),
child: Center(
child: Text("150,000",
style: blackTextStyle.copyWith(
fontSize: 25,
fontWeight: bold,
)),
),
child: Center(
child: Text("50,000",
style: blackTextStyle.copyWith(
fontSize: 25,
fontWeight: bold,
)),
),
))
],
),
SizedBox(
height: 10,
),
Row(
children: [
Expanded(
child: GestureDetector(
onTap: () {
if (timer != null) timer?.cancel();
tapIdle();
),
)),
SizedBox(
width: 10,
),
Expanded(
child: GestureDetector(
onTap: () {
if (timer != null) timer?.cancel();
tapIdle();
if (mounted) {
setState(() {
amountController!.text = cTopUp3;
});
}
},
child: Container(
padding:
EdgeInsets.symmetric(vertical: 15),
decoration: BoxDecoration(
border: Border.all(
color: (amountController!.text ==
cTopUp3)
? Color(0xff005DAC)
: Colors.black12),
borderRadius: BorderRadius.circular(7),
),
child: Center(
child: Text("100,000",
style: blackTextStyle.copyWith(
fontSize: 25,
fontWeight: bold,
)),
),
if (mounted) {
setState(() {
amountController!.text = cTopUp2;
});
}
},
child: Container(
padding:
EdgeInsets.symmetric(vertical: 15),
decoration: BoxDecoration(
border: Border.all(
color: (amountController!.text ==
cTopUp2)
? Color(0xff005DAC)
: Colors.black12),
borderRadius: BorderRadius.circular(7),
),
)),
SizedBox(
width: 10,
),
Expanded(
child: Center(
child: Text("150,000",
style: blackTextStyle.copyWith(
fontSize: 25,
fontWeight: bold,
)),
),
),
))
],
),
SizedBox(
height: 10,
),
Row(
children: [
Expanded(
child: GestureDetector(
onTap: () {
if (timer != null) timer?.cancel();
......@@ -1487,7 +1457,7 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
if (mounted) {
setState(() {
amountController!.text = cTopUp4;
amountController!.text = cTopUp3;
});
}
},
......@@ -1497,26 +1467,61 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
decoration: BoxDecoration(
border: Border.all(
color: (amountController!.text ==
cTopUp4)
cTopUp3)
? Color(0xff005DAC)
: Colors.black12),
borderRadius:
BorderRadius.circular(7),
borderRadius: BorderRadius.circular(7),
),
child: Center(
child: Text("200,000",
child: Text("100,000",
style: blackTextStyle.copyWith(
fontSize: 25,
fontWeight: bold,
)),
),
),
)),
SizedBox(
width: 10,
),
Expanded(
child: GestureDetector(
onTap: () {
if (timer != null) timer?.cancel();
tapIdle();
if (mounted) {
setState(() {
amountController!.text = cTopUp4;
});
}
},
child: Container(
padding:
EdgeInsets.symmetric(vertical: 15),
decoration: BoxDecoration(
border: Border.all(
color: (amountController!.text ==
cTopUp4)
? Color(0xff005DAC)
: Colors.black12),
borderRadius:
BorderRadius.circular(7),
),
child: Center(
child: Text("200,000",
style: blackTextStyle.copyWith(
fontSize: 25,
fontWeight: bold,
)),
),
),
),
],
),
],
),
),
],
),
],
),
Container(
margin: EdgeInsets.only(top: 30),
padding: EdgeInsets.symmetric(horizontal: 17),
......@@ -1626,11 +1631,13 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
),
],
),
),
),
),
),
),
),
],
),
);
});
});
......@@ -1664,20 +1671,11 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
}
});
return Container(
width: 1000,
height: 800,
padding:
const EdgeInsets.symmetric(horizontal: 150, vertical: 30),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(28),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.3), //color of shadow
spreadRadius: 3, //spread radius
blurRadius: 7, // blur radius
offset: Offset(3, 3), // changes position of shadow
),
],
color:lightBackgroundColor,
),
child: Scaffold(
body: Column(children: [
......@@ -2155,7 +2153,7 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
),
TimerBuilder.periodic(Duration(seconds: 1), builder: (context) {
// print("${getSystemTime()}");
return Column(
return Row(
children: [
Text(
"${getSystemTime()}",
......@@ -2165,14 +2163,6 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
fontWeight: bold,
),
),
Text(
"${getDate()}",
style: TextStyle(
color: darkBackgroundColor,
fontSize: 17,
fontWeight: semiBold,
),
),
],
);
}),
......@@ -2418,7 +2408,7 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
),
Positioned(
bottom: 36,
left: 60,
left: 0,
child: Row(
children: [
Container(
......@@ -2429,26 +2419,54 @@ class _HomePageState extends State<HomePage> implements AlertDialogCallback {
width: 12,
height: 12,
),
// SizedBox(width: 4), // add some space between the color and text
// Text(
// '${_downloadSpeed.toStringAsFixed(2)} KB/s',
// style: TextStyle(fontSize: 12, color: Colors.grey),
// ),
],
),
),
// Positioned(
// bottom: 20,
// left: 0,
// child: Ink(
// decoration: ShapeDecoration(
// color: Colors.white,
// shape: CircleBorder(),
// ),
// child: InkWell(
// borderRadius: BorderRadius.circular(1000.0),
// onTap: () {
// // aksi yang ingin dilakukan ketika tombol ditekan
// },
// child: Padding(
// padding: const EdgeInsets.all(8.0),
// child: Icon(Icons.settings, size: 28,),
// ),
// ),
// ),
// ),
Positioned(
bottom: 20,
left: 0,
child: IconButton(
icon: Icon(Icons.settings),
onPressed: () {
// aksi yang ingin dilakukan ketika tombol ditekan
},
bottom: 30,
left: 30,
child: Row(
children: [
TimerBuilder.periodic(Duration(seconds: 1), builder: (context) {
// print("${getSystemTime()}");
return Row(
children: [
Text(
"${getDate()}",
style: TextStyle(
color: darkBackgroundColor,
fontSize: 15,
fontWeight: semiBold,
),
),
],
);
}),
],
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
......
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