step 25 : ganti icon apk

This commit is contained in:
sindhu
2024-01-17 13:54:41 +07:00
parent 88ad1d6584
commit 987a5a5c3a
47 changed files with 131 additions and 29 deletions

View File

@@ -14,7 +14,9 @@
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize"
android:screenOrientation="portrait"
>
<!-- Specifies an Android theme to apply to this Activity as soon as <!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues while the Flutter UI initializes. After that, this theme continues

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 984 B

After

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -10,7 +10,10 @@ class Constant {
static double designWidthPhone = 390; static double designWidthPhone = 390;
static String bearerName = "petty-cash"; static String bearerName = "petty-cash";
static String version = "1.00"; // static String version = "1.00";
// NOTE VERSI HARUS SAMA DENGAN PUBSPEC.YAML
static String version = "1.0.0";
// static String baseUrl = "https://devregonline.pramita.co.id/one-api/xdoc/"; // static String baseUrl = "https://devregonline.pramita.co.id/one-api/xdoc/";

View File

@@ -8,6 +8,9 @@ import 'app/route.dart';
void main() async { void main() async {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
initializeDateFormatting(); initializeDateFormatting();
await SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
]);
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
statusBarIconBrightness: statusBarIconBrightness:
Brightness.dark, // this will change the brightness of the icons Brightness.dark, // this will change the brightness of the icons

View File

@@ -28,6 +28,27 @@ class HomeScreen extends HookConsumerWidget {
final listTransaksiHome = useState<List<ListTransaksiHomeModel>>( final listTransaksiHome = useState<List<ListTransaksiHomeModel>>(
List.empty(growable: true), List.empty(growable: true),
); );
final M_CompanyName = useState("-");
// company name
Future<String> getCompanyName() async {
final shared = await SharedPreferences.getInstance();
String M_CompanyName = "-";
if (shared != null) {
final bearerString = shared.get(Constant.bearerName).toString();
final xmodel = jsonDecode(bearerString);
if (xmodel != null) {
M_CompanyName = xmodel["model"]["M_CompanyName"];
}
}
if (M_CompanyName == "0") {
// throw BaseRepositoryException(message: 'Invalid Company ID');
}
return M_CompanyName;
}
useEffect(() { useEffect(() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) async { WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {
@@ -40,6 +61,7 @@ class HomeScreen extends HookConsumerWidget {
// Navigator.popAndPushNamed(context, loginRoute); // Navigator.popAndPushNamed(context, loginRoute);
return; return;
} }
M_CompanyName.value = await getCompanyName();
}); });
return () {}; return () {};
}, []); }, []);
@@ -125,8 +147,12 @@ class HomeScreen extends HookConsumerWidget {
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text( title: Text(
'Home Screen', // 'Home Screen',
style: TextStyle(color: Constant.textWhite), M_CompanyName.value,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Constant.textWhite,
),
), ),
backgroundColor: Constant.pcBtnBackgroundColor, backgroundColor: Constant.pcBtnBackgroundColor,
iconTheme: IconThemeData( iconTheme: IconThemeData(

View File

@@ -158,6 +158,7 @@ class CustomDrawer extends HookConsumerWidget {
backgroundColor: Constant.textGrey.withOpacity(0.16), backgroundColor: Constant.textGrey.withOpacity(0.16),
label: Text( label: Text(
M_CompanyName.value, M_CompanyName.value,
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
color: Constant.textGreyv2, color: Constant.textGreyv2,
), ),
@@ -320,6 +321,18 @@ class CustomDrawer extends HookConsumerWidget {
); );
}, },
), ),
Spacer(),
// Versi Aplikasi
ListTile(
title: Text(
'Versi ${Constant.version}',
style: Constant.titleH4Login(context: context)
.copyWith(color: Constant.textGrey),
),
onTap: () {},
),
], ],
), ),
), ),

View File

@@ -92,7 +92,7 @@ class HistoryRowAtasWidget extends HookConsumerWidget {
String formatDateString(String inputDate) { String formatDateString(String inputDate) {
try { try {
// Parsing tanggal dari string input // Parsing tanggal dari string input
DateTime date = DateFormat('dd-MM-yyyy','id').parse(inputDate); DateTime date = DateFormat('dd-MM-yyyy', 'id').parse(inputDate);
// Format tanggal ke '30 Des 2023' // Format tanggal ke '30 Des 2023'
String formattedDate = DateFormat('dd MMM yyyy', 'id').format(date); String formattedDate = DateFormat('dd MMM yyyy', 'id').format(date);
@@ -108,19 +108,71 @@ class HistoryRowAtasWidget extends HookConsumerWidget {
Widget getIconUrl(String categoryid) { Widget getIconUrl(String categoryid) {
List<Map<String, String>> iconDataList = [ List<Map<String, String>> iconDataList = [
{'categoryid': '1', 'url': 'https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg'}, {
{'categoryid': '2', 'url': 'https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg'}, 'categoryid': '1',
{'categoryid': '3', 'url': 'https://devone.aplikasi.web.id/pettycash-media/icon/icon_3.svg'}, 'url':
{'categoryid': '4', 'url': 'https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg'}, 'https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg'
{'categoryid': '5', 'url': 'https://devone.aplikasi.web.id/pettycash-media/icon/icon_5.svg'}, },
{'categoryid': '6', 'url': 'https://devone.aplikasi.web.id/pettycash-media/icon/icon_6.svg'}, {
{'categoryid': '7', 'url': 'https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg'}, 'categoryid': '2',
{'categoryid': '8', 'url': 'https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg'}, 'url':
{'categoryid': '9', 'url': 'https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg'}, 'https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg'
{'categoryid': '10', 'url': 'https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg'}, },
{'categoryid': '11', 'url': 'https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg'}, {
{'categoryid': '12', 'url': 'https://devone.aplikasi.web.id/pettycash-media/icon/icon_12.svg'}, 'categoryid': '3',
{'categoryid': '13', 'url': 'https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg'}, 'url':
'https://devone.aplikasi.web.id/pettycash-media/icon/icon_3.svg'
},
{
'categoryid': '4',
'url':
'https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg'
},
{
'categoryid': '5',
'url':
'https://devone.aplikasi.web.id/pettycash-media/icon/icon_5.svg'
},
{
'categoryid': '6',
'url':
'https://devone.aplikasi.web.id/pettycash-media/icon/icon_6.svg'
},
{
'categoryid': '7',
'url':
'https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg'
},
{
'categoryid': '8',
'url':
'https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg'
},
{
'categoryid': '9',
'url':
'https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg'
},
{
'categoryid': '10',
'url':
'https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg'
},
{
'categoryid': '11',
'url':
'https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg'
},
{
'categoryid': '12',
'url':
'https://devone.aplikasi.web.id/pettycash-media/icon/icon_12.svg'
},
{
'categoryid': '13',
'url':
'https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg'
},
]; ];
String urlFix = ""; String urlFix = "";
@@ -130,7 +182,8 @@ class HistoryRowAtasWidget extends HookConsumerWidget {
// urlFix = // urlFix =
// "https://devone.aplikasi.web.id/pettycash-media/icon/icon_$icon_category_id.svg"; // "https://devone.aplikasi.web.id/pettycash-media/icon/icon_$icon_category_id.svg";
urlFix = iconDataList[i]['url'] ?? "https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg"; urlFix = iconDataList[i]['url'] ??
"https://devone.aplikasi.web.id/pettycash-media/icon/icon_13.svg";
} }
} }
@@ -271,21 +324,23 @@ class HistoryRowAtasWidget extends HookConsumerWidget {
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
Container( Container(
// width: Constant.getActualXPhone(context: context, x: 32), width: Constant.getActualXPhone(context: context, x: 80),
height: Constant.getActualYPhone(context: context, y: 19), height: Constant.getActualYPhone(context: context, y: 24),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Constant.bgIconHistory, color: Constant.bgIconHistory,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(6.0), Radius.circular(6.0),
), ),
), ),
child: Padding( child: Align(
padding: EdgeInsets.all(2.0), alignment: Alignment.center,
child: Text( child: Text(
tipe, tipe,
style: Constant.body1_600(context: context).copyWith( style: Constant.body1_600(context: context).copyWith(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Constant.pcBtnBackgroundColor), color: Constant.pcBtnBackgroundColor,
fontSize: 14,
),
), ),
), ),
), ),

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 780 B

After

Width:  |  Height:  |  Size: 715 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -71,20 +71,20 @@ dev_dependencies:
flutter_launcher_icons: flutter_launcher_icons:
android: "launcher_icon" android: "launcher_icon"
ios: true ios: true
image_path: "images/logo_apk.png" image_path: "images/logo_apk_v2.png"
min_sdk_android: 21 # android min sdk min:16, default 21 min_sdk_android: 21 # android min sdk min:16, default 21
web: web:
generate: true generate: true
image_path: "images/logo_apk.png" image_path: "images/logo_apk_v2.png"
background_color: "#00FFFFFF" background_color: "#00FFFFFF"
theme_color: "#00FFFFFF" theme_color: "#00FFFFFF"
windows: windows:
generate: true generate: true
image_path: "images/logo_apk.png" image_path: "images/logo_apk_v2.png"
icon_size: 48 # min:48, max:256, default: 48 icon_size: 48 # min:48, max:256, default: 48
macos: macos:
generate: true generate: true
image_path: "images/logo_apk.png" image_path: "images/logo_apk_v2.png"
# The following section is specific to Flutter packages. # The following section is specific to Flutter packages.
flutter: flutter:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 780 B

After

Width:  |  Height:  |  Size: 715 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB