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 'dart:math'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { |
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
Future main() async { | |
final Iterable<Locale> supportedLocales = [Locale('en'), Locale('ar')]; | |
await Langs.init(supportedLocales: supportedLocales, loadDeviceLanguage: true); | |
runApp(MyApp(supportedLocales: supportedLocales)); | |
print(Langs.string('sample.item.name')); | |
print(Langs.string('name')); | |
} |
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
//Place this script inside your application module build.gradle | |
//It will create a new task(s) based on your application variants within (run) group | |
//sample: ./gradlew installRunDebug | |
//sample: ./gradlew installRunStagDebug | |
project.afterEvaluate { | |
android.applicationVariants.all { variant -> | |
task "installRun${variant.name.capitalize()}"(type: Exec, dependsOn: "install${variant.name.capitalize()}", group: "run") { | |
commandLine = ["adb", "shell", "monkey", "-p", variant.applicationId + " 1"] | |
doLast { |
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
package com.mosh.arabicfix; | |
/** | |
(Mosh Arabic Shaper) this API should fix Arabic shapes used within Android views, and canvas. | |
Copyright (C) 2011 Mohammad Mshari Ersan (mosh_java@yahoo.com) | |
* IF YOU LIKED IT, DONATE BY HIRING ME, OR LET ME MAKE YOUR PROJECT. | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by |
OlderNewer