Skip to content

Instantly share code, notes, and snippets.

View imrhk's full-sized avatar
🎯
Focusing

Rahul Kumar imrhk

🎯
Focusing
  • Bluestacks Inc.
  • India
  • X @imrhk
View GitHub Profile
import 'package:flutter/material.dart';
import 'package:pattern_formatter/pattern_formatter.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
runApp(MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Hello World'),
),
@imrhk
imrhk / main.dart
Created May 30, 2022 12:06
Simple Icon Widget example in flutter
import 'package:flutter/material.dart';
void main() {
runApp(const IconExampleApp());
}
class IconExampleApp extends StatelessWidget {
const IconExampleApp({Key? key}) : super(key: key);
@override
@imrhk
imrhk / main.dart
Created April 13, 2022 05:56
AnimatedPositioned example
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
@imrhk
imrhk / main.dart
Created January 19, 2022 12:48
Dart optional argument
void main() async {
foo("Test", null);
}
void foo(String a, [String? b = "c"]) {
print(a);
print(b);
}