Skip to content

Instantly share code, notes, and snippets.

View Abhilash-Chandran's full-sized avatar
👋
Hi

Abhilash Chandran Abhilash-Chandran

👋
Hi
View GitHub Profile
@Abhilash-Chandran
Abhilash-Chandran / main.dart
Last active January 12, 2022 16:27
Overflow Text button
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@Abhilash-Chandran
Abhilash-Chandran / main.dart
Created June 18, 2021 21:42
Firestore document size calculation
import "dart:typed_data";
/// An example collection from firestore.
/// Covers most datatypes of firestore list in this page.
/// https://firebase.google.com/docs/firestore/storage-size#document-size
/// Reference field is omitted for now. But shold be easy to implement with the help of cloud_firestore package.
final collection = [
{
"name": "John",
"lastname": "Doe",
@Abhilash-Chandran
Abhilash-Chandran / main.dart
Created June 17, 2021 07:02
Customized tab indicator with gradients.
import 'package:flutter/material.dart';
void main() {
runApp(TabBarDemo());
}
class TabBarDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@Abhilash-Chandran
Abhilash-Chandran / main.dart
Created April 28, 2021 09:29
pageview with scrollbar.
/// Flutter code sample for PageView
// Here is an example of [PageView]. It creates a centered [Text] in each of the three pages
// which scroll horizontally.
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
/// This is the main application widget.
@Abhilash-Chandran
Abhilash-Chandran / main.dart
Created April 22, 2021 09:20
generic methods
void main() {
for (int i = 0; i < 5; i++) {
adder(i);
}
}
void adder<int>(int a){
print(a+1);
}
@Abhilash-Chandran
Abhilash-Chandran / main.dart
Last active April 14, 2021 10:33
ScrollableView
import 'package:flutter/material.dart';
// import 'blocks/block1.dart';
// import 'blocks/block2.dart';
// import 'blocks/block3.dart';
// import 'blocks/block4.dart';
void main() {
runApp(ScrollableView());
}
@Abhilash-Chandran
Abhilash-Chandran / dashbaoard.py
Last active March 4, 2021 18:16
A demo for dynamic call back in Dash plotly setting information on button id.
import typing as t
import numpy as np
import json
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_components as dbc
import dash.dependencies as ddd
import plotly.express as px
@Abhilash-Chandran
Abhilash-Chandran / main.dart
Created January 12, 2021 17:21
FlutterStepper with ListView content.
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => new _MyAppState();
}
@Abhilash-Chandran
Abhilash-Chandran / main.dart
Last active January 5, 2021 10:07
Ink widget decoration visible or/and renders outside the ListView boundary up to the cacheExtent.
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@Abhilash-Chandran
Abhilash-Chandran / main.dart
Last active August 30, 2020 08:06
smooth scrolling for pageview
/// [https://github.com/flutter/flutter/issues/35687]
import 'package:flutter/material.dart';
import 'package:flutter/gestures.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key key}) : super(key: key);