This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'dart:async'; | |
void main() => runApp(new BackButtonOverrideDemoWidget()); | |
class BackButtonOverrideDemoWidget extends StatefulWidget{ | |
@override | |
_BackButtonOverrideDemoWidgetState createState() => new _BackButtonOverrideDemoWidgetState(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello Devs, | |
I keep in receiving this error message "I/flutter (11828): Another exception was thrown: setState() called in constructor: CartState#040e6(lifecycle state: created, no widget, not mounted) | |
". I believe this is due to how I'm using setState() method in my CartState class below: | |
class CartScreen extends StatefulWidget{ | |
createState(){ | |
return CartState(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I am getting an error: | |
type 'Future<dynamic>' is not a subtype of type | |
'StreamTransformer<List<dynamic>, List<dynamic>>" in my BLOC. | |
This is the structure of my app: | |
A BLOC (namely, reports_bloc.com). | |
A Repository (namely, repository.dart). | |
A API Provider (namely, api_provider.dart). | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
******************************************************************************** | |
Golang - Asterisk and Ampersand Cheatsheet | |
******************************************************************************** | |
Also available at: https://play.golang.org/p/lNpnS9j1ma | |
Allowed: | |
-------- | |
p := Person{"Steve", 28} stores the value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Widget build(BuildContext context) { | |
final mBloc = BlocProvider.mReportsBloc(context); | |
final fBloc = BlocProvider.fReportsBloc(context); | |
return DefaultTabController( | |
length: 2, | |
child: Scaffold( | |
appBar: AppBar( | |
elevation: 1.5, | |
bottom: TabBar( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use the latest ubuntu environment (18.04) available on travis | |
dist: xenial | |
language: go | |
# Force-enable Go modules. Also force go to use the code in vendor/ | |
# These will both be unnecessary when Go 1.13 lands. | |
env: | |
- GO111MODULE=on | |
- GOFLAGS='-mod vendor' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// This is an example of a resilient service worker program written in Go. | |
// | |
// This program will run a worker, wait 5 seconds, and run it again. | |
// It exits when SIGINT or SIGTERM is received, while ensuring any ongoing work | |
// is finished before exiting. | |
// | |
// Unexpected panics are also handled: program won't crash if the worker panics. | |
// However, panics in goroutines started by the worker won't be handled and have |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
type node struct { | |
value string | |
left *node | |
right *node | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"math/rand" | |
"os" | |
"time" | |
) |
OlderNewer