the Arrycah mobile applications built with google Flutter framework is an ✅✅Easy job search mobile application, that brings tech employees and employers together 😎😎, to aid fast, safe, secure jobs and quality service as well to the job seekers and job givers.🚀 🚀 ⚡️⚡️ with the help of a third party Rest API(written and built with PHP lang and Laravel), data is sent and recieved with information of the employee and the emppoyers. for proper state management, Arycah has adopted the famous and wildly used state managementt solution Riverpod to properly manage and maintain its code and application state. the code structure consists of various folders/components which perform various task
welcome to the arycah code.
enjoy, do have a good time🔥✌🏽.
visit pub.dev to explore more flutter packages.
Install & use dependencies http:📡
used to fecth api endpoint.
run "flutter pub add http"
import 'package:http/http.dart' as http;
var url = Uri.parse('https://example.com/whatsit/create');
var response = await http.post(url, body: {'name': 'doodle', 'color': 'blue'});
print('Response status: ${response.statusCode}');
print('Response body: ${response.body}');
print(await http.read(Uri.parse('https://example.com/foobar.txt')));
Install & use dependencies flutter_hooks:🪝
run "flutter pub add flutter_hooks"
class Example extends HookWidget {
const Example({Key key, required this.duration})
: super(key: key);
final Duration duration;
@override
Widget build(BuildContext context) {
final controller = useAnimationController(duration: duration);
return Container();
}
}
Install & use dependencies firebase_core:🔥☄️
run "flutter pub add firebase_core"
Next, within the main function, ensure WidgetsFlutterBinding is initialized and then initialize Firebase:
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
runApp(MyApp());
}
Install & use dependencies cloud_firestore:🔥⛅️
run "flutter pub add cloud_firestore"
FirebaseFirestore firestore = FirebaseFirestore.instance;
visit firebase.flutter.dev for better usage instruction
Install & use dependencies firebase_auth:🔥🔐
flutter pub add firebase_auth
import 'package:firebase_auth/firebase_auth.dart';
visit firebase.flutter.dev for better usage instruction
Install & use dependencies firebase_storage:🔥📦
run "flutter pub add cloud_firestore"
import 'package:cloud_firestore/cloud_firestore.dart';
To create a new Firestore instance, call the instance getter on FirebaseFirestore:
FirebaseFirestore firestore = FirebaseFirestore.instance;
Install & use dependencies google_sign_in:🔏
<!-- Put me in the [my_project]/ios/Runner/Info.plist file -->
<!-- Google Sign-in Section -->
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<!-- TODO Replace this value: -->
<!-- Copied from GoogleService-Info.plist key REVERSED_CLIENT_ID -->
<string>com.googleusercontent.apps.861823949799-vc35cprkp249096uujjn0vvnmcvjppkn</string>
</array>
</dict>
</array>
<!-- End of the Google Sign-in Section -->
import 'package:google_sign_in/google_sign_in.dart';
GoogleSignIn _googleSignIn = GoogleSignIn(
scopes: [
'email',
'https://www.googleapis.com/auth/contacts.readonly',
],
);
Future<void> _handleSignIn() async {
try {
await _googleSignIn.signIn();
} catch (error) {
print(error);
}
}
Install & use dependencies flutter_riverpod:🌊
flutter pub add flutter_riverpod
import 'package:flutter_riverpod/flutter_riverpod.dart';
Declare your providers as global variables:
final counterProvider = StateNotifierProvider((ref) {
return Counter();
});
class Counter extends StateNotifier<int> {
Counter(): super(0);
void increment() => state++;
}
Use them inside your widgets in a compile time safe way. No runtime exceptions!
class Example extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final count = ref.watch(counterProvider);
return Text(count.toString());
}
}
Install & use dependencies file_picker:🪄
Install & use dependencies open_file:
run "flutter pub add open_file"
import 'package:open_file/open_file.dart';
Install & use dependencies font_awesome_flutter:
flutter pub add font_awesome_flutter
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class MyWidget extends StatelessWidget {
Widget build(BuildContext context) {
return IconButton(
// Use the FaIcon Widget + FontAwesomeIcons class for the IconData
icon: FaIcon(FontAwesomeIcons.gamepad),
onPressed: () { print("Pressed"); }
);
}
}
Install & use dependencies google_fonts:
run "flutter pub add google_fonts"
import 'package:google_fonts/google_fonts.dart';
Text(
'You have pushed the button this many times:',
style: GoogleFonts.oswald(textStyle: headline4),
),
Install & use dependencies iconly:🚀
run "flutter pub add iconly"
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class IconlyWidget extends StatelessWidget {
Widget build(BuildContext context) {
return IconButton(
icon: Icon(IconlyLight.search),
onPressed: () { print("Pressed"); }
);
}
}
Install & use dependencies intl:
Install & use dependencies flutter_localizations:🇳🇬🇬🇧🇰🇷
flutter pub add localization
import 'package:localization/localization.dart';
Now, add the delegate in MaterialApp or CupertinoApp and define a path where the translation json files will be:
@override
Widget build(BuildContext context) {
// set json file directory
// default value is ['lib/i18n']
LocalJsonLocalization.delegate.directories = ['lib/i18n'];
return MaterialApp(
localizationsDelegates: [
// delegate from flutter_localization
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
// delegate from localization package.
LocalJsonLocalization.delegate,
],
home: HomePage(),
);
}
Add supported languages This setting is important to tell Flutter which languages your app is prepared to work with. We can do this by simply adding the Locale in the supportedLocales property:
return MaterialApp(
supportedLocales: [
Locale('en', 'US'),
Locale('es', 'ES'),
Locale('pt', 'BR'),
],
...
);
This project relies on flutter_localizations and follows the official internationalization guide for Flutter.
To add a new localizable string, open the app_en.arb file at lib/l10n/arb/app_en.arb.
{
"@@locale": "en",
"counterAppBarTitle": "Counter",
"@counterAppBarTitle": {
"description": "Text shown in the AppBar of the Counter Page"
}
}
{
"@locale": "en",
"counterAppBarTitle": "Counter",
"@counterAppBarTitle": {
"description": "Text shown in the AppBar of the Counter Page"
},
"helloWorld": "Hello World",
"@helloWorld": {
"description": "Hello World Text"
},
}
import 'package:worddle/l10n/l10n.dart';
@override
Widget build(BuildContext context) {
final l10n = context.l10n;
return Text(l10n.helloWorld);
}
Update the CFBundleLocalizations array in the Info.plist at ios/Runner/Info.plist to include the new locale.
<key>CFBundleLocalizations</key>
<array>
<string>en</string>
<string>es</string>
</array>
For each supported locale, add a new ARB file in lib/l10n/arb.
├── l10n
│ ├── arb
│ │ ├── app_en.arb
│ │ └── app_es.arb
app_en.arb
{
"@@locale": "en",
"counterAppBarTitle": "Counter",
"@counterAppBarTitle": {
"description": "Text shown in the AppBar of the Counter Page"
}
}
app_es.arb
{
"@@locale": "es",
"counterAppBarTitle": "Contador",
"@counterAppBarTitle": {
"description": "Texto mostrado en la AppBar de la página del contador"
}
}
🔥🔥🔥🔥🔥