Skip to content

Instantly share code, notes, and snippets.

View ajazify's full-sized avatar
🏄‍♂️
I'm your Creative Developer

Muhammed Ajas A A ajazify

🏄‍♂️
I'm your Creative Developer
View GitHub Profile
@ajazify
ajazify / slivers_appbar_example.dart
Created May 20, 2025 12:31
Slivers AppBar Example - Semi Parallax Effect
import 'package:flutter/material.dart';
void main() {
runApp(const MainApp());
}
class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
@ajazify
ajazify / choicechip_example.dart
Created May 20, 2025 11:57
ChoiceChip Example - The special widget can select and and unselect
import 'package:flutter/material.dart';
void main() {
runApp(const MainApp());
}
class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
@ajazify
ajazify / stepper_example.dart
Created May 20, 2025 11:27
Stepper Widget Usage - Mock "Add Firebase to your Flutter app"
import 'package:flutter/material.dart';
void main() {
runApp(const MainApp());
}
class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
@ajazify
ajazify / fancy_color_print.dart
Last active May 20, 2025 12:32
Print in various ANSI terminal colors (perfect for CLI or logging in Dart/Flutter console).
/// Fancy print utility
void fancyPrint(dynamic value, {String label = "Result", String color = ConsoleColors.green}) {
print("${color}✨ [$label] => $value${ConsoleColors.reset}");
}
/// ANSI color codes
class ConsoleColors {
static const reset = '\x1B[0m';
static const red = '\x1B[31m';
static const green = '\x1B[32m';
@ajazify
ajazify / gradle_error.dart
Created March 5, 2025 16:31
FAILURE: Build failed with an exception. The applied Android Gradle Plugin version (7.3.0) is lower than the minimum supported 7.3.1.
FAILURE: Build failed with an exception.
The applied Android Gradle Plugin version (7.3.0) is lower than the minimum supported 7.3.1.
or
* Where:
Build file 'C:\Users\ajas\Videos\cubit\clone\cubit-bloc-flutter-example\cubit_bloc_flutter\android\build.gradle' line: 7
* What went wrong:
@ajazify
ajazify / git-commands.sh
Created March 3, 2025 18:47
Git commands cheat sheet - Enjoy 😀😍😎
# Git Commands Cheat Sheet 🚀
## 🔹 Setup Git
```bash
git config --global user.name "Your Name"
git config --global user.email "youremail@example.com"
git config --list
```
## 🔹 Initialize or Clone Repository
@ajazify
ajazify / common_dropdown.dart
Last active January 23, 2025 06:15
DropDown State and District Interconnected
static Widget customDropdownFormField<T>({
required BuildContext context,
required String label,
required String hint,
required T? value,
required List<DropdownMenuItem<T>> items,
required Function(T?) onChanged,
required String? Function(T?)? validator,
}) {
@ajazify
ajazify / main.dart
Last active December 26, 2024 05:36
ERROR: I/flutter ( 4515): ClientException with SocketException: Failed host lookup: 'jsonplaceholder.typicode.com' (OS Error: No address associated with hostname, errno = 7), uri=https://jsonplaceholder.typicode.com/comments W/Parcel ( 4515): Expecting binder but got null!
void main() {
WidgetsFlutterBinding.ensureInitialized(); // add this line to fix it
runApp(const MyApp());
}
// restart emulator
// rerun the app
@ajazify
ajazify / validation.dart
Created November 6, 2024 10:29
VALIDATION in a smart way
enum ValidationType {
phoneNumber,
panCard,
aadharCard,
pincode,
bankAccount,
email,
otp,
emptyCheck,
}
@ajazify
ajazify / utility.dart
Created November 6, 2024 10:18
Common Utility page
import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';
class CommonUtils {
CommonUtils._();
static snackbar({required BuildContext context, required String message}) {
SnackBar snackBar = SnackBar(
// behavior: SnackBarBehavior.floating,
content: Text(message),