feat&fix: add launcher icon and fix model for trash

This commit is contained in:
pahmiudahgede 2025-05-16 08:03:07 +07:00
parent 054640e563
commit 5ac66566d2
37 changed files with 177 additions and 170 deletions

View File

@ -1,8 +1,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="rijig_mobile"
android:label="Rijig"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
android:icon="@mipmap/launcher_icon"
android:enableOnBackInvokedCallback="true">
<activity
android:name=".MainActivity"

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -427,7 +427,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
@ -484,7 +484,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";

View File

@ -1,122 +1 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
{"images":[{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@3x.png","scale":"3x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@3x.png","scale":"3x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@3x.png","scale":"3x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@1x.png","scale":"1x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@3x.png","scale":"3x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@1x.png","scale":"1x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@1x.png","scale":"1x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@1x.png","scale":"1x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@2x.png","scale":"2x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@1x.png","scale":"1x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@2x.png","scale":"2x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@1x.png","scale":"1x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@2x.png","scale":"2x"},{"size":"83.5x83.5","idiom":"ipad","filename":"Icon-App-83.5x83.5@2x.png","scale":"2x"},{"size":"1024x1024","idiom":"ios-marketing","filename":"Icon-App-1024x1024@1x.png","scale":"1x"}],"info":{"version":1,"author":"xcode"}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 788 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 704 B

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 862 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 862 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -1,7 +1,9 @@
import 'dart:convert';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:http_parser/http_parser.dart';
import 'package:http/http.dart' as http;
import 'package:rijig_mobile/core/api/api_exception.dart';
import 'package:rijig_mobile/core/storage/expired_token.dart';
@ -48,6 +50,7 @@ class Https {
dynamic body,
Encoding? encoding,
String? baseUrl,
http.MultipartRequest? multipartRequest,
}) async {
final requestHeaders = await _getHeaders();
String url = "${baseUrl ?? _baseUrl}$desturl";
@ -55,43 +58,49 @@ class Https {
http.Response response;
try {
switch (method.toLowerCase()) {
case 'get':
response = await http.get(Uri.parse(url), headers: requestHeaders);
break;
case 'post':
response = await http.post(
Uri.parse(url),
body: jsonEncode(body),
headers: requestHeaders,
encoding: encoding,
);
break;
case 'put':
response = await http.put(
Uri.parse(url),
body: jsonEncode(body),
headers: requestHeaders,
encoding: encoding,
);
break;
case 'delete':
response = await http.delete(
Uri.parse(url),
body: jsonEncode(body),
headers: requestHeaders,
);
break;
case 'patch':
response = await http.patch(
Uri.parse(url),
body: jsonEncode(body),
headers: requestHeaders,
encoding: encoding,
);
break;
default:
throw ApiException('Unsupported HTTP method: $method', 405);
if (multipartRequest != null) {
response = await multipartRequest.send().then(
(response) => http.Response.fromStream(response),
);
} else {
switch (method.toLowerCase()) {
case 'get':
response = await http.get(Uri.parse(url), headers: requestHeaders);
break;
case 'post':
response = await http.post(
Uri.parse(url),
body: jsonEncode(body),
headers: requestHeaders,
encoding: encoding,
);
break;
case 'put':
response = await http.put(
Uri.parse(url),
body: jsonEncode(body),
headers: requestHeaders,
encoding: encoding,
);
break;
case 'delete':
response = await http.delete(
Uri.parse(url),
body: jsonEncode(body),
headers: requestHeaders,
);
break;
case 'patch':
response = await http.patch(
Uri.parse(url),
body: jsonEncode(body),
headers: requestHeaders,
encoding: encoding,
);
break;
default:
throw ApiException('Unsupported HTTP method: $method', 405);
}
}
final int statusCode = response.statusCode;
@ -189,4 +198,48 @@ class Https {
baseUrl: baseUrl,
);
}
Future<dynamic> uploadFormData(
String desturl, {
required Map<String, dynamic> formData,
Map<String, String> headers = const {},
String? baseUrl,
}) async {
var request = http.MultipartRequest(
'POST',
Uri.parse("${baseUrl ?? _baseUrl}$desturl"),
);
request.headers.addAll(await _getHeaders());
formData.forEach((key, value) async {
if (value is String) {
request.fields[key] = value;
} else if (value is File) {
String fileName = value.uri.pathSegments.last;
if (value.lengthSync() > 10485760) {
throw ApiException('File size exceeds 10MB', 401);
}
request.files.add(
await http.MultipartFile.fromPath(
key,
value.path,
filename: fileName,
contentType: MediaType('image', 'png'),
),
);
} else {
throw ApiException('Unsupported value type for field $key', 401);
}
});
return await _request(
'post',
desturl: desturl,
headers: headers,
multipartRequest: request,
);
}
}

View File

@ -133,7 +133,9 @@ class AboutComponentState extends State<AboutComponent> {
Brightness.dark
? Colors.blue
: Colors.blue)
.withOpacity(_current == entry.key ? 0.9 : 0.2),
.withValues(
alpha: _current == entry.key ? 0.9 : 0.2,
),
),
),
);

View File

@ -81,11 +81,7 @@ class _HomeScreenState extends State<HomeScreen> {
],
),
const Gap(15),
Container(
height:
250, // Tentukan tinggi yang sesuai untuk AboutComponent
child: AboutComponent(),
),
AboutComponent(),
],
),
Gap(20),

View File

@ -55,6 +55,7 @@ class RequestPickScreen extends StatelessWidget {
fit: BoxFit.cover,
),
title: Text(category.name),
subtitle: Text("${category.price}"),
),
);
},

View File

@ -1,6 +1,7 @@
class Category {
final String id;
final String name;
final dynamic price;
final String icon;
final String createdAt;
final String updatedAt;
@ -8,6 +9,7 @@ class Category {
Category({
required this.id,
required this.name,
required this.price,
required this.icon,
required this.createdAt,
required this.updatedAt,
@ -17,6 +19,7 @@ class Category {
return Category(
id: json['id'],
name: json['name'],
price: json['estimatedprice'],
icon: json['icon'],
createdAt: json['createdAt'],
updatedAt: json['updatedAt'],

View File

@ -39,6 +39,7 @@ class MyApp extends StatelessWidget {
builder: (_, child) {
return MaterialApp.router(
debugShowCheckedModeBanner: false,
title: "Rijig",
routerConfig: router,
);
},

View File

@ -1,6 +1,14 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
sha256: "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd"
url: "https://pub.dev"
source: hosted
version: "4.0.7"
args:
dependency: transitive
description:
@ -41,6 +49,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.4.0"
checked_yaml:
dependency: transitive
description:
name: checked_yaml
sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
url: "https://pub.dev"
source: hosted
version: "2.0.3"
cli_util:
dependency: transitive
description:
name: cli_util
sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c
url: "https://pub.dev"
source: hosted
version: "0.4.2"
clock:
dependency: transitive
description:
@ -174,6 +198,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.2.1"
flutter_launcher_icons:
dependency: "direct main"
description:
name: flutter_launcher_icons
sha256: bfa04787c85d80ecb3f8777bde5fc10c3de809240c48fa061a2c2bf15ea5211c
url: "https://pub.dev"
source: hosted
version: "0.14.3"
flutter_lints:
dependency: "direct dev"
description:
@ -297,7 +329,7 @@ packages:
source: hosted
version: "1.3.0"
http_parser:
dependency: transitive
dependency: "direct main"
description:
name: http_parser
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
@ -312,6 +344,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.0"
image:
dependency: transitive
description:
name: image
sha256: "4e973fcf4caae1a4be2fa0a13157aa38a8f9cb049db6529aa00b4d71abc4d928"
url: "https://pub.dev"
source: hosted
version: "4.5.4"
intl:
dependency: "direct main"
description:
@ -328,6 +368,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.6.7"
json_annotation:
dependency: transitive
description:
name: json_annotation
sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
url: "https://pub.dev"
source: hosted
version: "4.9.0"
jwt_decoder:
dependency: "direct main"
description:
@ -512,6 +560,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.8"
posix:
dependency: transitive
description:
name: posix
sha256: f0d7856b6ca1887cfa6d1d394056a296ae33489db914e365e2044fdada449e62
url: "https://pub.dev"
source: hosted
version: "6.0.2"
provider:
dependency: "direct main"
description:
@ -749,6 +805,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.5.0"
yaml:
dependency: transitive
description:
name: yaml
sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce
url: "https://pub.dev"
source: hosted
version: "3.1.3"
sdks:
dart: ">=3.7.2 <4.0.0"
flutter: ">=3.27.0"

View File

@ -17,6 +17,7 @@ dependencies:
sdk: flutter
flutter_carousel_widget: ^3.1.0
flutter_dotenv: ^5.2.1
flutter_launcher_icons: ^0.14.3
flutter_screenutil: ^5.9.3
flutter_secure_storage: ^9.2.4
flutter_svg: ^2.1.0
@ -25,6 +26,7 @@ dependencies:
go_router: ^15.1.1
google_fonts: ^6.0.0
http: ^1.3.0
http_parser: ^4.1.2
iconsax_flutter: ^1.0.0
intl: ^0.20.2
jwt_decoder: ^2.0.1
@ -40,6 +42,12 @@ dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon/logorijig.png"
min_sdk_android: 21 # android min sdk min:16, default 21
flutter:
uses-material-design: true
assets: