This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main(List<String> arguments) { | |
final productData = <Map<String, dynamic>>[ | |
{'productId': 1000, 'productName': 'Product 1000'}, | |
{'productId': 1001, 'productName': 'Product 1001'} | |
]; | |
final stockData = <Map<String, int>>[ | |
{'productId': 1000, 'locationId': 1, 'stock': 21}, | |
{'productId': 1000, 'locationId': 2, 'stock': 8}, | |
{'productId': 1001, 'locationId': 1, 'stock': 4}, | |
{'productId': 1001, 'locationId': 2, 'stock': 10} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": 67, | |
"avatar": "https://site.skinuphoria.com/wp-content/uploads/2021/02/inggaribnuhasan_avatar.jpg", | |
"email": "///", | |
"first_name": "//", | |
"last_name": "//", | |
"name": "//", | |
"phone": "+62810101010", | |
"steam": "ab1234", | |
"roles": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int param(int item) { | |
final x = 10; | |
int sumItem = 0; | |
for(var x = 0; x < item; x++){ | |
sumItem +=x; | |
} | |
return sumItem; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void _setupChopper() { | |
final httpx = HttpClient(); | |
httpx.findProxy = (url) => 'PROXY <ip_address_from_postman>:9090'; | |
httpx.badCertificateCallback = | |
(X509Certificate cert, String host, int port) => true; | |
_client = ChopperClient( | |
converter: JsonConverter(), | |
baseUrl: baseurl, | |
client: http.IOClient(httpx), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
{ | |
"name": "web-dev", | |
"request": "launch", | |
"type": "dart", | |
"program": "<YOUR_PATH>/jojo/officeless/main_qa.dart", | |
"args": [ | |
"--flavor", | |
"qualityAssurance" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stream<List<ForecastEntity>> streamData(DateTime time) { | |
return dao.watchWather(time).transform(StreamTransformer.fromHandlers( | |
handleData: (data, sink) { | |
final item = List.from(data.map((e) => ForecastEntity( | |
cityName: e.cityName, | |
temp: e.temp, | |
datetime: e.createDate.toIso8601String()))); | |
sink.add(item); | |
}, | |
)); |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mr Marathi | |
bs Bosnian | |
ee_TG Ewe (Togo) | |
ms Malay | |
kam_KE Kamba (Kenya) | |
mt Maltese | |
ha Hausa | |
es_HN Spanish (Honduras) | |
ml_IN Malayalam (India) | |
ro_MD Romanian (Moldova) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyApps extends StatelessWidget { | |
final Router router = Router(); | |
MyApps() { | |
RoutesConfig.configRoutes(router); | |
} | |
@override | |
Widget build(BuildContext context) { | |
return Provider.value( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:fluro/fluro.dart'; | |
import 'package:bagidua/utils/route_name.dart'; | |
import 'package:bagidua/utils/routes_handler.dart'; | |
class RoutesConfig { | |
static void configRoutes(Router router) { | |
router.define(RouteName.home, handler: RoutesHandler.homeHandler()); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:bagidua/screens/food/detail_food_page.dart'; | |
import 'package:bagidua/screens/home_page.dart'; | |
import 'package:bagidua/screens/order/order_page.dart'; | |
import 'package:fluro/fluro.dart'; | |
import 'package:flutter/material.dart'; | |
class RoutesHandler { | |
static dynamic homeHandler() { | |
return Handler( |