Skip to content

Instantly share code, notes, and snippets.

View Purvik's full-sized avatar
💭
Swimming in pool of tech water

Purvik Rana Purvik

💭
Swimming in pool of tech water
View GitHub Profile
@Purvik
Purvik / main.dart
Created September 4, 2025 09:09
AutoComplete option update from Parent
import 'package:flutter/material.dart';
/// Flutter code sample for [Autocomplete].
void main() => runApp(const AutocompleteExampleApp());
class AutocompleteExampleApp extends StatefulWidget {
const AutocompleteExampleApp({super.key});
@override
@Purvik
Purvik / main.dart
Created June 6, 2024 12:03
PositionedTransition example
import 'dart:developer';
import 'package:flutter/material.dart';
/// Flutter code sample for [PositionedTransition].
void main() => runApp(const PositionedTransitionExampleApp());
class PositionedTransitionExampleApp extends StatelessWidget {
const PositionedTransitionExampleApp({super.key});
@Purvik
Purvik / main.dart
Created May 10, 2022 08:02
Changing Text Style on Selection
import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
@Purvik
Purvik / main.dart
Created November 22, 2021 15:09
Flutter - Multiple ListView in a Screen
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@Purvik
Purvik / main.dart
Last active October 19, 2021 12:26
Row Button with Label of Different Length
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@Purvik
Purvik / main.dart
Created September 23, 2021 10:20
Flutter - Multi Selection Using List View
import 'package:flutter/material.dart';
void main() => runApp(SelectListItem());
class SelectListItem extends StatefulWidget {
@override
_SelectListItemState createState() => _SelectListItemState();
}
@Purvik
Purvik / main.dart
Created September 13, 2021 10:44
ExpansionTile using ListView
/// Flutter code sample for ExpansionTile
// This example demonstrates different configurations of ExpansionTile.
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
/// This is the main application widget.
class MyApp extends StatelessWidget {
@Purvik
Purvik / main.dart
Created September 1, 2021 11:16
Fixed Bottom Navigation Bar
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
/// This is the main application widget.
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
static const String _title = 'Flutter Code Sample';
@Purvik
Purvik / main.dart
Created May 3, 2021 12:58
AppBar with PreferredSize bottom widget
import 'package:flutter/material.dart';
final Color darkBlue = Color(0xFF02539A);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@Purvik
Purvik / main.dart
Created January 31, 2021 09:11
Difference of yield & yield*
///yield Example
// Stream<int> str() async* {
// List<int> numbers = [1, 2, 3, 4, 5];
// for (var i in numbers) {
// if (i > 2) yield i; // only yield numbers greater than 2
// }
// }
// main() async {
// await for (var i in str()) {