Skip to content

Instantly share code, notes, and snippets.

View ekoRemDev's full-sized avatar
🌍
Coding

Eko ekoRemDev

🌍
Coding
View GitHub Profile
Use this command to see java paths: /usr/libexec/java_home -V | grep jdk
@ekoRemDev
ekoRemDev / gist:7965870f556b11a88c58ac91154f6e7e
Created September 10, 2021 03:02
flutter remove all routes
Navigator.of(context)
.pushNamedAndRemoveUntil('/login', (Route<dynamic> route) => false);
isCareNumberValid = e.length >= careNumberLength;
onPressed: () {
SystemNavigator.pop();
},
@ekoRemDev
ekoRemDev / group_profile_page.dart
Created April 27, 2021 18:54
how to call Provider
SchedulerBinding.instance.addPostFrameCallback((_) {
Provider.of<ProviderGroupOperations>(context).getGroupDetails(widget.uuid);
});
@ekoRemDev
ekoRemDev / container_gradient.dart
Created April 23, 2021 09:11
container gradient
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: <Color>[
Color(0xFF01D47F),
Color(0xFF59E0A2),
Color(0xFF01D47F),
Color(0xFF01D47F),
],
@ekoRemDev
ekoRemDev / consumer.dart
Last active April 21, 2021 22:10
Consumer Body
Consumer<ProviderLanguage>(builder: (context, language, child){
return Container();
}
),
@ekoRemDev
ekoRemDev / gradient_container.dart
Created April 17, 2021 23:18
container with gradient
Container(
width : MediaQuery.of(context).size.width,
height :MediaQuery.of(context).size.height * 0.60,
// color : Colors.amber[100],
// color : widget.backGroundColor,
// height :10,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
@ekoRemDev
ekoRemDev / fit.dart
Created April 16, 2021 05:58
fit bottom widget on top the keyboard
final double screenHeight = MediaQuery.of(context).size.height;
final double keyboardHeight = MediaQuery.of(context).viewInsets.bottom;
return Scaffold(
resizeToAvoidBottomInset: false,
body: SizedBox(
height: screenHeight - keyboardHeight,
child: SingleChildScrollView(
child: Column(
children: [
const SizedBox(height: 200),
@ekoRemDev
ekoRemDev / utf8convert
Created April 14, 2021 06:19
utf8convert
import 'dart:convert';
String utf8convert(String text) {
List<int> bytes = text.toString().codeUnits;
return utf8.decode(bytes);
}