Skip to content

Instantly share code, notes, and snippets.

View manthri-mohan-sai's full-sized avatar
👨‍💻
Coding

Mohan Sai Manthri manthri-mohan-sai

👨‍💻
Coding
  • 09:57 (UTC +05:30)
View GitHub Profile
@manthri-mohan-sai
manthri-mohan-sai / icon_button.dart
Created August 19, 2021 04:29
Simple Icon Button with Favorite icon.
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@manthri-mohan-sai
manthri-mohan-sai / swipe_to_dismiss.dart
Created August 20, 2021 05:11
Testing swipe to dismiss functionality.
import 'package:flutter/material.dart';
import 'dart:math' as math;
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
// This widget is the root of your application.
@manthri-mohan-sai
manthri-mohan-sai / list_tile_overflow_fix.dart
Last active August 20, 2021 10:30
Fixing overflow in listtile subtiltle
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@manthri-mohan-sai
manthri-mohan-sai / stack_example
Created September 13, 2021 04:11
This gist explains how can we stack items like image and decorated container on top at bottom center.
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@manthri-mohan-sai
manthri-mohan-sai / cupertino_segmented_control.dart
Created October 12, 2021 01:36
Cupertino Segmented Control implementation
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@manthri-mohan-sai
manthri-mohan-sai / example.dart
Created October 14, 2021 10:42
PopupMenuButton -> show dialog on popupMenuItem tap
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@manthri-mohan-sai
manthri-mohan-sai / card.dart
Last active November 27, 2022 19:19
Subtitle overflow to elipsis
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@manthri-mohan-sai
manthri-mohan-sai / arc.dart
Last active October 5, 2022 16:02
How to draw Arc?
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@manthri-mohan-sai
manthri-mohan-sai / timer.dart
Last active November 7, 2022 11:17
Pausing timer
import 'package:flutter/material.dart';
import 'dart:async';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {