Skip to content

Instantly share code, notes, and snippets.

@peerwaya
peerwaya / AndroidManifest.xml
Created October 7, 2016 16:06 — forked from vikrum/AndroidManifest.xml
Firebase+Android sample app with background Service + local notifications.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.bgfirebaseapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="17" />
@peerwaya
peerwaya / executors.dart
Created December 8, 2018 10:55 — forked from slightfoot/executors.dart
Executors in Dart for Flutter
import 'dart:async';
import 'dart:isolate';
void main(List<String> arguments) async {
Executor executor = await Executor.create();
executor.run(Task('Name 1', task1));
executor.run(Task('Name 2', task2));
executor.run(Task('Name 3', task3));
print('sent');
@peerwaya
peerwaya / scratch_card.dart
Created December 8, 2018 10:55 — forked from slightfoot/scratch_card.dart
Scratch Card - Unfinished Flutter implementation of https://allu.io/react-scratchcard/
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'dart:math' as math;
void main() => runApp(DemoApp());
class DemoApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@peerwaya
peerwaya / custom_appbar.dart
Created December 8, 2018 10:56 — forked from slightfoot/custom_appbar.dart
Custom AppBar - 21th November 2018 - #HumpdayQandA
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'HumpDayQandA 21st',
theme: ThemeData.light(),
@peerwaya
peerwaya / page_notification.dart
Created December 8, 2018 10:57 — forked from slightfoot/page_notification.dart
Page Notification Example
import 'package:flutter/material.dart';
void main() => runApp(ExampleApp());
class ExampleApp extends StatefulWidget {
@override
ExampleAppState createState() => ExampleAppState();
}
class ExampleAppState extends State<ExampleApp> {
@peerwaya
peerwaya / charts.dart
Created December 8, 2018 11:00 — forked from slightfoot/charts.dart
Charts Demo - 10th October 2018 - #HumpdayQandA
import 'dart:math';
import 'package:flutter/material.dart';
void main() => runApp(ChartsDemoApp());
class ChartsDemoApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
// See: https://twitter.com/shakil807/status/1042127387515858949
// https://github.com/pchmn/MaterialChipsInput/tree/master/library/src/main/java/com/pchmn/materialchips
// https://github.com/BelooS/ChipsLayoutManager
void main() => runApp(ChipsDemoApp());
@peerwaya
peerwaya / main_example.dart
Created December 8, 2018 11:06 — forked from slightfoot/main_example.dart
Paged ListView - Loads data async into the list. You'll notice if you scroll slowly you'll never see the loading spinner, this is because we specify a `cacheExtent` to the widget. `separatorBuilder` is completely optional. You can override the default loading spinner by specifying a `loadingBuilder`. Return null from the `itemLoader` to stop loa…
import 'dart:async';
import 'package:flutter/material.dart';
import 'paged_listview.dart';
void main() => runApp(MaterialApp(home: HomeScreen()));
class HomeScreen extends StatefulWidget {
@override
_HomeAppState createState() => _HomeAppState();
}
import 'model.dart';
typedef OnChatMessageCallback = void Function(int index, ChatMessage message);
abstract class ChatManager {
ChatManager();
ChatSession getNamedSession(String name);
}
@peerwaya
peerwaya / swipe_button.dart
Created December 9, 2018 15:12 — forked from slightfoot/swipe_button.dart
Flutter Swipe Button Demo
import 'package:flutter/material.dart';
import 'package:flutter/physics.dart';
void main() => runApp(SwipeDemoApp());
class SwipeDemoApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(