Skip to content

Instantly share code, notes, and snippets.

View ajilo297's full-sized avatar
:octocat:
Working

Ajil Oommen ajilo297

:octocat:
Working
  • Bangalore, India
View GitHub Profile
@ajilo297
ajilo297 / streamed_list.dart
Created February 7, 2020 07:42
A utility class that can hold values from Stream<List>
import 'dart:async';
class StreamedList<T> {
StreamController<List<T>> _controller = StreamController.broadcast();
Stream<List<T>> get stream => _controller.stream;
List<T> get dataList => this._list;
List<T> _list = [];
@escamoteur
escamoteur / nextField.dart
Created September 13, 2019 12:22
So easy is it now to implement a next field behavior for forms, meaning that the focus is moved as soon the user tabs the next button on the keyboard
class _MyHomePageState extends State<MyHomePage>
with SingleTickerProviderStateMixin {
TabController _tabController;
FocusScopeNode _node = FocusScopeNode(); /// <-----------------
@override
void initState() {
_tabController = TabController(length: 3, vsync: this);
@Nash0x7E2
Nash0x7E2 / Allow-multiple-gestures.dart
Last active June 30, 2024 17:40
[DEPRECATED] Sample code on how to enable gesture pass through so that both the parent and the child widget receive the gesture.
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
//Main function. The entry point for your Flutter app.
void main() {
runApp(
MaterialApp(
home: Scaffold(
body: DemoApp(),
),