10 Commits

Author SHA1 Message Date
Stephen
69a3e1965c [Homepage] 10. fix style homepage for android device 2024-01-12 17:27:28 +07:00
Stephen
680dc463ea [Homepage] 9. add user profile google 2024-01-12 15:45:34 +07:00
Stephen
f2c6b222cc [Homepage] 8. add Navbar Bottom 2024-01-12 11:49:10 +07:00
Stephen
0daef445a2 [Homepage] 7. add Rekap Presensi 2024-01-11 17:45:52 +07:00
Stephen
50cacf159f [Homepage] 6. add Menu Cuti & Lembur 2024-01-11 15:14:00 +07:00
Stephen
a91f039dfc [Homepage] 5. Generated after fluter run 2024-01-11 15:04:09 +07:00
Stephen
ce0b753da5 [Homepage] 4. add card time on Homepage screen 2024-01-11 14:58:37 +07:00
Stephen
9cff5e1db8 [Homepage] 3. add date & time widget 2024-01-11 14:55:38 +07:00
Stephen
17f451edb6 [Homepage] 2. add images 2024-01-11 14:54:26 +07:00
Stephen
87163441ad [Homepage] 1. add Constant 2024-01-11 14:28:31 +07:00
23 changed files with 815 additions and 22 deletions

BIN
images/alert_badge.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

BIN
images/avatar_c.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 885 B

BIN
images/card_bg_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
images/divider.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

BIN
images/finger_tap.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
images/home_orange.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

BIN
images/person.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

BIN
images/person_grey.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

BIN
images/task.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

View File

@@ -8,8 +8,11 @@ class Constant {
static double designWidthPhone = 390;
// color theme
static Color textTrueBlack = const Color(0xff000000);
static Color textBlack = const Color(0xff212B36);
static Color textDarkGrey = const Color(0xff637381);
static Color textLightGrey = const Color(0xff919EAB);
static Color textOrange = const Color(0xffF15A29);
// size convertion
static double getActualXPhone({
@@ -34,6 +37,14 @@ class Constant {
);
}
static TextStyle titleH1_500_18({required BuildContext context}) {
return TextStyle(
fontSize: Constant.getActualYPhone(context: context, y: 18),
fontWeight: FontWeight.w500,
fontFamily: 'Public Sans'
);
}
static TextStyle titleH2_600({required BuildContext context}) {
return TextStyle(
fontSize: Constant.getActualYPhone(context: context, y: 12),
@@ -41,10 +52,59 @@ class Constant {
);
}
static TextStyle titleH2_600_14({required BuildContext context}) {
return TextStyle(
fontSize: Constant.getActualYPhone(context: context, y: 14),
fontWeight: FontWeight.w600,
fontFamily: 'Public Sans'
);
}
static TextStyle titleH2_700({required BuildContext context}) {
return TextStyle(
fontFamily: 'Quicksand',
fontSize: Constant.getActualYPhone(context: context, y: 14),
fontWeight: FontWeight.w700,
);
}
static TextStyle logintitle_700({required BuildContext context}) {
return TextStyle(
fontSize: Constant.getActualYPhone(context: context, y: 15),
fontWeight: FontWeight.w700,
);
}
static TextStyle time_700({required BuildContext context}) {
return TextStyle(
fontSize: Constant.getActualYPhone(context: context, y: 28),
fontWeight: FontWeight.w700,
fontFamily: 'Quicksand',
);
}
static TextStyle subtitle_600_14({required BuildContext context}) {
return TextStyle(
fontSize: Constant.getActualYPhone(context: context, y: 14),
fontWeight: FontWeight.w700,
fontFamily: 'Public Sans',
);
}
static TextStyle subtitle_500_12({required BuildContext context}) {
return TextStyle(
fontSize: Constant.getActualYPhone(context: context, y: 12),
fontWeight: FontWeight.w500,
fontFamily: 'Public Sans',
);
}
static TextStyle date_600({required BuildContext context}) {
return TextStyle(
fontSize: Constant.getActualYPhone(context: context, y: 16),
fontWeight: FontWeight.w600,
fontFamily: 'Quicksand',
);
}
}

View File

@@ -1,3 +1,4 @@
import 'package:absensi_sas_flutter/screen/homepage/homepage_screen.dart';
import 'package:flutter/material.dart';
import '../test_flutter_map.dart';
import '../screen/login/login_screen.dart';
@@ -6,6 +7,7 @@ import '../screen/splash/splash_screen.dart';
const loginRoute = "/loginRoute";
const splashRoute = "/splashRoute";
const testFlutterMapRoute = "/testFlutterMapRoute";
const homepageRoute = "/homepageRoute";
class AppRoute {
static Route<dynamic> generateRoute(RouteSettings settings) {
@@ -43,6 +45,17 @@ class AppRoute {
});
}
// homepage
if (settings.name == homepageRoute) {
return MaterialPageRoute(builder: (context) {
return MediaQuery(
data: MediaQuery.of(context)
.copyWith(textScaleFactor: 1.0, padding: EdgeInsets.all(0)),
child: HomepageScreen(),
);
});
}
return MaterialPageRoute(builder: (context) {
return MediaQuery(
data: MediaQuery.of(context)

View File

@@ -1,10 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:intl/date_symbol_data_local.dart';
import '../app/route.dart';
// import '../test_map.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await initializeDateFormatting('id_ID', null);
runApp(const ProviderScope(child: MyApp()));
}
@@ -25,7 +27,7 @@ class MyApp extends StatelessWidget {
primarySwatch: Colors.orange,
),
// home: TestMap(),
initialRoute: loginRoute,
initialRoute: homepageRoute,
// initialRoute: testFlutterMapRoute,
onGenerateRoute: AppRoute.generateRoute,
);

View File

@@ -0,0 +1,623 @@
import 'package:absensi_sas_flutter/app/constant.dart';
import 'package:absensi_sas_flutter/screen/widget/real_date.dart';
import 'package:absensi_sas_flutter/screen/widget/real_time.dart';
import 'package:flutter/material.dart';
class HomepageScreen extends StatelessWidget {
const HomepageScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: Container(
width: Constant.getActualXPhone(context: context, x: 100),
height: Constant.getActualYPhone(context: context, y: 100),
child: FittedBox(
child: FloatingActionButton(
onPressed: () {},
backgroundColor: Color(0xFFFFFFFF),
shape: CircleBorder(),
child: Container(
width: Constant.getActualXPhone(context: context, x: 50),
height: Constant.getActualYPhone(context: context, y: 50),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(
'images/finger_tap_orange_botnav.png'), // Ganti dengan path gambar Anda
),
),
),
),
),
),
bottomNavigationBar: Container(
width: Constant.getActualXPhone(context: context, x: 390),
height: Constant.getActualYPhone(context: context, y: 84),
decoration: BoxDecoration(
color: Color(0xFFFFFFFF),
boxShadow: [
BoxShadow(
offset: Offset(0, -1),
blurRadius: 8,
spreadRadius: -8,
color: Color.fromRGBO(0, 0, 0, 0.10),
),
],
),
child: Row(
children: <Widget>[
Expanded(
child: Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Image(
image: AssetImage('images/home_orange.png'),
),
Text(
'Beranda',
style: Constant.subtitle_500_12(context: context).copyWith(
color: Constant.textOrange,
),
)
],
),
)),
Expanded(
child: Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Image(
image: AssetImage('images/person_grey.png'),
),
Text(
'Profile',
style: Constant.subtitle_500_12(context: context).copyWith(
color: Constant.textLightGrey,
),
)
],
),
)),
],
),
),
body: SafeArea(
child: Container(
width: Constant.getActualXPhone(context: context, x: 390),
height: Constant.getActualYPhone(context: context, y: 844),
child: Column(
children: [
Padding(
padding: EdgeInsets.only(
top: Constant.getActualYPhone(context: context, y: 58),
left: Constant.getActualXPhone(context: context, x: 33),
right: Constant.getActualXPhone(context: context, x: 27),
),
child: Container(
child: ListTile(
leading: Container(
width:
Constant.getActualXPhone(context: context, x: 36),
height:
Constant.getActualYPhone(context: context, y: 36),
child: Image(
image: AssetImage('images/avatar_c.png'),
)),
title: Text(
"Stephen Kusumo",
style: Constant.titleH1_700(context: context)
..copyWith(
color: Constant.textBlack,
),
),
subtitle: Text(
"Step@example.com",
style:
Constant.subtitle_500_12(context: context).copyWith(
color: Constant.textLightGrey,
),
),
trailing: Container(
width: Constant.getActualXPhone(context: context, x: 36),
height: Constant.getActualYPhone(context: context, y: 36),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12.0),
color: Colors.white,
shape: BoxShape.rectangle,
boxShadow: [
BoxShadow(
offset: Offset(0, 12),
blurRadius: 24,
color: Color.fromRGBO(145, 158, 171, 0.12),
),
],
),
child: IconButton(
onPressed: () {},
icon: Container(
width:
Constant.getActualXPhone(context: context, x: 20),
height:
Constant.getActualYPhone(context: context, y: 20),
child: Image(
image: AssetImage('images/alert_badge.png'),
),
),
),
),
),
),
),
SizedBox(
height: Constant.getActualYPhone(context: context, y: 44),
),
//Card Time
Padding(
padding: EdgeInsets.only(
left: Constant.getActualXPhone(context: context, x: 33),
right: Constant.getActualXPhone(context: context, x: 27),
),
child: Container(
width: Constant.getActualXPhone(context: context, x: 330),
height: Constant.getActualYPhone(context: context, y: 200),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
image: DecorationImage(
image: AssetImage(
'images/card_bg_1.png'), // Ganti dengan path gambar Anda
fit: BoxFit.fill, // Sesuaikan cara gambar ditampilkan
),
),
child: Padding(
padding: EdgeInsets.only(
top: Constant.getActualYPhone(context: context, y: 16),
left: Constant.getActualXPhone(context: context, x: 25),
right: Constant.getActualXPhone(context: context, x: 25),
),
child: Container(
width: Constant.getActualXPhone(context: context, x: 280),
height:
Constant.getActualYPhone(context: context, y: 150),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Date
RealTimeFormattedDate(),
SizedBox(
height: Constant.getActualYPhone(
context: context, y: 8),
),
//Time
RealTimeClock(), // Menampilkan waktu real-time menggunakan RealTimeClock
SizedBox(
height: Constant.getActualYPhone(
context: context, y: 20),
),
Row(
mainAxisAlignment: MainAxisAlignment
.center, // Menengahkan secara horizontal
children: [
Spacer(), // Spasi di sebelah kiri "Check In"
Column(
children: [
Image.asset(
'images/finger_tap.png', // Path gambar untuk "Check In"
width: Constant.getActualXPhone(
context: context, x: 22),
height: Constant.getActualYPhone(
context: context, y: 22),
),
SizedBox(
height: Constant.getActualYPhone(
context: context, y: 8),
),
Text(
'--:--',
style: TextStyle(
// Atur gaya teks '--:--' sesuai kebutuhan
),
),
Text(
'Clock In',
style:
Constant.titleH2_700(context: context)
.copyWith(
color: Constant.textLightGrey,
),
),
],
),
SizedBox(
width: Constant.getActualXPhone(
context: context, x: 96),
), // Jarak antara "Check In" dan "Check Out"
Column(
children: [
Image.asset(
'images/finger_tap.png', // Path gambar untuk "Check Out"
width: Constant.getActualXPhone(
context: context, x: 22),
height: Constant.getActualYPhone(
context: context, y: 22),
),
SizedBox(
height: Constant.getActualYPhone(
context: context, y: 8),
),
Text(
'--:--',
style: TextStyle(
// Atur gaya teks '--:--' sesuai kebutuhan
),
),
Text(
'Clock Out',
style:
Constant.titleH2_700(context: context)
.copyWith(
color: Constant.textLightGrey,
),
),
],
),
Spacer(), // Spasi di sebelah kanan "Check Out"
],
),
SizedBox(
height: Constant.getActualYPhone(
context: context, y: 16),
),
],
),
),
),
),
),
SizedBox(
height: Constant.getActualYPhone(context: context, y: 56),
),
//Menu Cuti Lembur
Padding(
padding: EdgeInsets.only(
left: Constant.getActualXPhone(context: context, x: 33),
right: Constant.getActualXPhone(context: context, x: 27),
),
child: Container(
width: Constant.getActualXPhone(context: context, x: 330),
child: Row(
children: [
//Menu Cuti
Container(
width:
Constant.getActualXPhone(context: context, x: 98),
// color: Colors.amber,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Color.fromRGBO(145, 158, 171, 0.20),
),
],
),
child: Padding(
padding: EdgeInsets.only(
left: Constant.getActualXPhone(
context: context, x: 12),
right: Constant.getActualXPhone(
context: context, x: 12),
top: Constant.getActualYPhone(
context: context, y: 8),
bottom: Constant.getActualYPhone(
context: context, y: 8),
),
child: InkWell(
onTap: () {},
child: Column(
children: [
Container(
child: Image(
width: Constant.getActualXPhone(
context: context, x: 50),
height: Constant.getActualYPhone(
context: context, y: 50),
image: AssetImage('images/person.png'),
),
),
SizedBox(
height: Constant.getActualYPhone(
context: context, y: 8),
),
Text(
'Cuti',
style:
Constant.titleH2_600_14(context: context)
.copyWith(
color: Constant.textDarkGrey,
),
),
],
),
),
),
),
SizedBox(
width:
Constant.getActualXPhone(context: context, x: 18),
),
//Menu Lembur
Container(
width:
Constant.getActualXPhone(context: context, x: 98),
// color: Colors.amber,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Color.fromRGBO(145, 158, 171, 0.20),
),
],
),
child: Padding(
padding: EdgeInsets.only(
left: Constant.getActualXPhone(
context: context, x: 12),
right: Constant.getActualXPhone(
context: context, x: 12),
top: Constant.getActualYPhone(
context: context, y: 8),
bottom: Constant.getActualYPhone(
context: context, y: 8),
),
child: InkWell(
onTap: () {},
child: Column(
children: [
Container(
child: Image(
width: Constant.getActualXPhone(
context: context, x: 50),
height: Constant.getActualYPhone(
context: context, y: 50),
image: AssetImage('images/task.png'),
),
),
SizedBox(
height: Constant.getActualYPhone(
context: context, y: 8),
),
Text(
'Lembur',
style:
Constant.titleH2_600_14(context: context)
.copyWith(
color: Constant.textDarkGrey,
),
),
],
),
),
),
),
],
),
),
),
SizedBox(
height: Constant.getActualYPhone(context: context, y: 56),
),
//Menu Rekap Presensi
Padding(
padding: EdgeInsets.only(
right: Constant.getActualXPhone(context: context, x: 27),
left: Constant.getActualXPhone(context: context, x: 33),
),
child: Container(
width: Constant.getActualXPhone(context: context, x: 330),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Rekap Presensi Bulan Ini',
style:
Constant.titleH1_500_18(context: context).copyWith(
color: Constant.textTrueBlack,
),
),
SizedBox(
height:
Constant.getActualYPhone(context: context, y: 20),
),
Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(16),
color: Colors.white, // Set background color to #FFF
boxShadow: [
BoxShadow(
color: Color.fromRGBO(145, 158, 171, 0.20),
blurRadius: 2,
),
],
),
child: Padding(
padding: EdgeInsets.only(
top: Constant.getActualYPhone(
context: context, y: 12),
bottom: Constant.getActualYPhone(
context: context, y: 12),
left: Constant.getActualXPhone(
context: context, x: 24),
right: Constant.getActualXPhone(
context: context, x: 24),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'24 hari',
style: Constant.subtitle_600_14(
context: context)
.copyWith(
color: Constant.textOrange,
),
),
SizedBox(
height: Constant.getActualYPhone(
context: context, y: 4),
),
SizedBox(
child: Row(
children: [
Image(
image: AssetImage(
'images/person_available_grey.png'),
),
SizedBox(
width: Constant.getActualXPhone(
context: context, x: 4),
),
Text(
'Kehadiran',
style: Constant.subtitle_500_12(
context: context)
.copyWith(
color: Constant.textDarkGrey,
),
),
],
),
)
],
),
),
Image(
image: AssetImage('images/divider.png'),
),
//Tidak Hadir
Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'2 hari',
style: Constant.subtitle_600_14(
context: context)
.copyWith(
color: Constant.textOrange,
),
),
SizedBox(
height: Constant.getActualYPhone(
context: context, y: 4),
),
SizedBox(
child: Row(
children: [
Image(
image: AssetImage(
'images/person_delete_grey.png'),
),
SizedBox(
width: Constant.getActualXPhone(
context: context, x: 4),
),
Text(
'Tidak Hadir',
style: Constant.subtitle_500_12(
context: context)
.copyWith(
color: Constant.textDarkGrey,
),
),
],
),
)
],
),
),
Image(
image: AssetImage('images/divider.png'),
),
//Tidak Hadir
Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'5 hari',
style: Constant.subtitle_600_14(
context: context)
.copyWith(
color: Constant.textOrange,
),
),
SizedBox(
height: Constant.getActualYPhone(
context: context, y: 4),
),
SizedBox(
child: Row(
children: [
Image(
image: AssetImage(
'images/task_pending_grey.png'),
),
SizedBox(
width: Constant.getActualXPhone(
context: context, x: 4),
),
Text(
'Lembur',
style: Constant.subtitle_500_12(
context: context)
.copyWith(
color: Constant.textDarkGrey,
),
),
],
),
),
],
),
),
],
),
),
),
],
),
),
),
],
),
),
),
);
}
}

View File

@@ -0,0 +1,38 @@
import 'package:absensi_sas_flutter/app/constant.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
class RealTimeFormattedDate extends StatefulWidget {
@override
_RealTimeFormattedDateState createState() => _RealTimeFormattedDateState();
}
class _RealTimeFormattedDateState extends State<RealTimeFormattedDate> {
late Stream<DateTime> _clockStream;
@override
void initState() {
super.initState();
_clockStream = Stream<DateTime>.periodic(Duration(seconds: 1), (i) => DateTime.now());
}
@override
Widget build(BuildContext context) {
return StreamBuilder<DateTime>(
stream: _clockStream,
builder: (context, snapshot) {
if (snapshot.hasData) {
String formattedDate = DateFormat('EEEE, d MMMM y', 'id_ID').format(snapshot.data!);
return Text(
formattedDate,
style: Constant.date_600(context: context).copyWith(
color: Constant.textBlack),
);
} else {
return Text('Loading...');
}
},
);
}
}

View File

@@ -0,0 +1,39 @@
import 'package:absensi_sas_flutter/app/constant.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
class RealTimeClock extends StatefulWidget {
@override
_RealTimeClockState createState() => _RealTimeClockState();
}
class _RealTimeClockState extends State<RealTimeClock> {
late Stream<DateTime> _clockStream;
@override
void initState() {
super.initState();
_clockStream = Stream<DateTime>.periodic(Duration(seconds: 1), (i) => DateTime.now());
}
@override
Widget build(BuildContext context) {
return StreamBuilder<DateTime>(
stream: _clockStream,
builder: (context, snapshot) {
if (snapshot.hasData) {
String formattedTime = DateFormat('HH:mm:ss').format(snapshot.data!);
return Text(
formattedTime,
style: Constant.time_700(context: context).copyWith(
color: Constant.textBlack,
),
);
} else {
return Text('Loading...');
}
},
);
}
}

View File

@@ -61,10 +61,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.17.1"
version: "1.18.0"
convert:
dependency: transitive
description:
@@ -337,13 +337,13 @@ packages:
source: hosted
version: "4.0.2"
intl:
dependency: transitive
dependency: "direct main"
description:
name: intl
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91"
url: "https://pub.dev"
source: hosted
version: "0.19.0"
version: "0.17.0"
js:
dependency: transitive
description:
@@ -388,26 +388,26 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
url: "https://pub.dev"
source: hosted
version: "0.12.15"
version: "0.12.16"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.5.0"
meta:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
mgrs_dart:
dependency: transitive
description:
@@ -577,10 +577,10 @@ packages:
dependency: transitive
description:
name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
sprintf:
dependency: transitive
description:
@@ -593,10 +593,10 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
state_notifier:
dependency: transitive
description:
@@ -609,10 +609,10 @@ packages:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
string_scanner:
dependency: transitive
description:
@@ -633,10 +633,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.5.1"
version: "0.6.1"
typed_data:
dependency: transitive
description:
@@ -677,6 +677,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.0"
web:
dependency: transitive
description:
name: web
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "0.3.0"
win32:
dependency: transitive
description:
@@ -710,5 +718,5 @@ packages:
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.0.6 <4.0.0"
dart: ">=3.2.0-194.0.dev <4.0.0"
flutter: ">=3.10.0"

View File

@@ -10,6 +10,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake)
# https://github.com/flutter/flutter/issues/57146.
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
# Set fallback configurations for older versions of the flutter tool.
if (NOT DEFINED FLUTTER_TARGET_PLATFORM)
set(FLUTTER_TARGET_PLATFORM "windows-x64")
endif()
# === Flutter Library ===
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
@@ -92,7 +97,7 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND} -E env
${FLUTTER_TOOL_ENVIRONMENT}
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
windows-x64 $<CONFIG>
${FLUTTER_TARGET_PLATFORM} $<CONFIG>
VERBATIM
)
add_custom_target(flutter_assemble DEPENDS

View File

@@ -31,6 +31,11 @@ bool FlutterWindow::OnCreate() {
this->Show();
});
// Flutter can complete the first frame before the "show window" callback is
// registered. The following call ensures a frame is pending to ensure the
// window is shown. It is a no-op if the first frame hasn't completed yet.
flutter_controller_->ForceRedraw();
return true;
}