Skip to content

Instantly share code, notes, and snippets.

View isaacadariku's full-sized avatar
👨‍💻
Focusing

Eternity (Isaac Adariku) isaacadariku

👨‍💻
Focusing
View GitHub Profile
@isaacadariku
isaacadariku / adapative_navigation.dart
Created September 26, 2023 14:42
A snippet of the adaptive navigation Layout for Reflection.app
LayoutBuilder(
builder: (context, dimension) {
final isExtended = dimension.maxWidth >= 800;
final optionalFAB = Offstage(
offstage: !showFAB,
child: HomeFAB(
isExtended: isExtended,
fabWidth: isExtended ? 188 : 60,
fabHeight: 60,
),
@isaacadariku
isaacadariku / bottom_nav_bar.dart
Created September 26, 2023 14:39
Snippet for reflection.app mobile bottom nav bar
ClipRRect(
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 2, sigmaY: 2),
child: Container(
height: 88,
alignment: Alignment.topCenter,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
@isaacadariku
isaacadariku / color_util.dart
Created September 26, 2023 14:33
Snippet of the color changes in reflection.app guide cards
const double minLightness = 0.30;
const double maxLightness = 0.55;
const double lightnessRange = maxLightness - minLightness;
const int numberOfColors = 3;
/// The top card gradients logic
///
/// Generate a list of gradient colors based on the provided [originalColor].
/// This function generates three gradient colors by adjusting the lightness of the [originalColor].
List<Color> generateGradientColors(Color originalColor) {
@isaacadariku
isaacadariku / main.dart
Last active August 30, 2023 20:53
Email Autocomplete
import 'package:flutter/material.dart';
const List<String> popularEmailDomains = [
'gmail.com',
'yahoo.com',
'hotmail.com',
'yahoo.co.uk',
'outlook.com',
'icloud.com',
'aol.com',
@isaacadariku
isaacadariku / main.dart
Created December 27, 2022 00:18
Load image frame from Gif
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'dart:ui' as ui;
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
@isaacadariku
isaacadariku / main.dart
Last active December 24, 2022 19:49
Custom Shapes in flutter with enhanced enums
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@isaacadariku
isaacadariku / main.dart
Last active December 25, 2022 09:59
App-wide notifications demo
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@isaacadariku
isaacadariku / main.dart
Created December 22, 2022 23:22
Accessible image demo
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@isaacadariku
isaacadariku / main.dart
Created December 22, 2022 23:12
Accessibility Button Demo 
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
@isaacadariku
isaacadariku / main.dart
Created December 22, 2022 23:12
Accessibility Button Demo 
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,