Skip to content

Instantly share code, notes, and snippets.

Aaron K Saunders aaronksaunders

Block or report user

Report or block aaronksaunders

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aaronksaunders
aaronksaunders / Markdium-Dart.dart
Created Jun 19, 2019
Markdium-Flutter Tabs w/ State Management
View Markdium-Dart.dart
void main() => runApp(
ChangeNotifierProvider(
child: TabBarDemo(),
builder: (BuildContext context) {
return CartModel();
},
),
);
@aaronksaunders
aaronksaunders / Markdium-Dart.dart
Created Jun 19, 2019
Markdium-Flutter Tabs w/ State Management
View Markdium-Dart.dart
class TabBarDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
var count = Provider.of(context).items.length;
@aaronksaunders
aaronksaunders / Markdium-Dart.dart
Created Jun 19, 2019
Markdium-Flutter Tabs w/ State Management
View Markdium-Dart.dart
RaisedButton(
child: Text("Add Item"),
onPressed: () async {
final form = _formKey.currentState;
form.save();
if (form.validate()) {
Provider.of(context)
.add(new Item(_name, num.parse(_price)));
} else {
print('validate failed');
@aaronksaunders
aaronksaunders / Markdium-Dart.dart
Created Jun 19, 2019
Markdium-Flutter Tabs w/ State Management
View Markdium-Dart.dart
import 'dart:collection';
import 'package:flutter/material.dart';
class Item {
String name;
num price;
Item(this.name, this.price);
}
@aaronksaunders
aaronksaunders / Markdium-Dart.dart
Created Jun 19, 2019
Markdium-Flutter Tabs w/ State Management
View Markdium-Dart.dart
RaisedButton(
child: Text("Add Item"),
onPressed: () async {
final form = _formKey.currentState;
form.save();
if (form.validate()) {
Provider.of(context)
.add(new Item(_name, num.parse(_price)));
} else {
print('validate failed');
@aaronksaunders
aaronksaunders / Markdium-Dart.dart
Created Jun 19, 2019
Markdium-Flutter Tabs w/ State Management
View Markdium-Dart.dart
class TabBarDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
var count = Provider.of(context).items.length;
@aaronksaunders
aaronksaunders / Markdium-Dart.dart
Created Jun 19, 2019
Markdium-Flutter Tabs w/ State Management
View Markdium-Dart.dart
import 'dart:collection';
import 'package:flutter/material.dart';
class Item {
String name;
num price;
Item(this.name, this.price);
}
@aaronksaunders
aaronksaunders / Markdium-Dart.dart
Created Jun 19, 2019
Markdium-Flutter Tabs w/ State Management
View Markdium-Dart.dart
void main() => runApp(
ChangeNotifierProvider(
child: TabBarDemo(),
builder: (BuildContext context) {
return CartModel();
},
),
);
@aaronksaunders
aaronksaunders / Markdium-JSX.jsx
Created Jun 6, 2019
Markdium-Ionic React (Beta) Tabs: Step By Step
View Markdium-JSX.jsx
// FILE: App.tsx
} />
@aaronksaunders
aaronksaunders / Markdium-TypeScript.tsx
Created Jun 6, 2019
Markdium-Ionic React (Beta) Tabs: Step By Step
View Markdium-TypeScript.tsx
// FILE: TabRoot.tsx
interface IAppProps {}
const TabRoot: React.FC = props => {
return (
You can’t perform that action at this time.