Skip to content

Instantly share code, notes, and snippets.

View pratikbutani's full-sized avatar
🎯
Exploring things

Pratik Butani pratikbutani

🎯
Exploring things
View GitHub Profile
@pratikbutani
pratikbutani / target-sdk-36-upgrade-prompt.md
Created August 5, 2026 10:12
Target SDK 36 (Android 16) upgrade checklist — for Flutter & native Android apps

Target Android API 36 (Android 16) Upgrade — Engineering Prompt

By Pratik Butani

Context

Google Play requires app updates to target API level 36 (Android 16) by August 31, 2026 (an extension to Nov 1, 2026 is requestable). This applies identically to native Android and Flutter apps — Flutter builds through the same Android Gradle project under android/.

@pratikbutani
pratikbutani / main.dart
Last active April 1, 2025 10:42
Flutter: Dynamic Multi-Timezone Clock Matrix
import 'dart:async';
import 'dart:math' as math;
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
@pratikbutani
pratikbutani / index.html
Last active March 7, 2023 17:56
Dart with HTML & CSS
<html>
<head>
<meta charset="UTF-8">
<title>Dart + HTML + CSS Example</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<h1>Click the button to change the color of the text!</h1>
<br><br>
<button id="colorButton">Change color</button>
@pratikbutani
pratikbutani / dart_isolation.dart
Created March 2, 2023 07:32
Dart Isolation Sample
import 'dart:isolate';
void main() async {
final receivePort = ReceivePort();
final isolate = await Isolate.spawn(doHeavyWork, receivePort.sendPort);
receivePort.listen((data) => print('Result: $data'));
}
void doHeavyWork(SendPort sendPort) {
// Perform some CPU-intensive work here
@pratikbutani
pratikbutani / main.dart
Last active October 16, 2022 14:01
Change color of border & IconData in TextInput
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@pratikbutani
pratikbutani / main.dart
Last active October 16, 2022 13:51
StatefulBuilder Use case with AlertDialog
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@pratikbutani
pratikbutani / main.dart
Created October 13, 2022 13:07
BottomSheet with TextInputBox & Keyboard
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
static const String _title = 'Flutter Code Sample';
@override
@pratikbutani
pratikbutani / main.dart
Last active October 1, 2022 14:59
Round Container With Image in Flutter
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@pratikbutani
pratikbutani / demo_clipper.dart
Created June 21, 2022 09:33
Clipper Demo using Container in Row (Clip a part of container)
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@pratikbutani
pratikbutani / main.dart
Created April 3, 2021 12:49
Flutter onChange of TextField getting call on keyboard hide (via back press)
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {