Skip to content

Instantly share code, notes, and snippets.

View Emex4gman's full-sized avatar
🗺️
I'm open for collaboration

Chukwuemeka Ibebugwu Emex4gman

🗺️
I'm open for collaboration
View GitHub Profile
import { observable } from 'mobx'
import { persist } from 'mobx-persist'
class DeviceStore {
@persist @observable public deviceId: string = ''
constructor() {
this.resolevDeviceId = this.resolevDeviceId.bind(this)
this.resolevDeviceId()

Keybase proof

I hereby claim:

  • I am emex4gman on github.
  • I am ibefx (https://keybase.io/ibefx) on keybase.
  • I have a public key ASDbj6tO_rQrvZJkZBfoHTYxbrIC0LcTR5X8WUVmcAYyDwo

To claim this, I am signing this object:

@Emex4gman
Emex4gman / app.dart
Last active August 8, 2021 18:34
ui state app
import 'package:flutter/material.dart';
enum AppState { LOADING, COMPLETED, ERROR, IDEL }
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
import 'package:flutter/material.dart';
class NewPage extends StatefulWidget {
NewPage({Key? key}) : super(key: key);
@override
_NewPageState createState() => _NewPageState();
}
class _NewPageState extends State<NewPage> {
import 'package:flutter/material.dart';
class DatePicker extends StatefulWidget {
final TextEditingController dateCtr;
DatePicker({required this.dateCtr});
@override
_DatePickerState createState() => _DatePickerState();
}
class _DatePickerState extends State<DatePicker> {
@Emex4gman
Emex4gman / navigation_service.dart
Created March 17, 2021 16:04
A Nice way to Navigate in Flutter without Context class
import 'package:flutter/material.dart';
class NavigationService {
/// Creating the first instance
static final NavigationService _instance = NavigationService._internal();
NavigationService._internal();
/// With this factory setup, any time NavigationService() is called
/// within the appication _instance will be returned and not a new instance
factory NavigationService() => _instance;