Skip to content
This repository was archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
feat: store new resources
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasWanke committed Mar 11, 2020
1 parent 12f7798 commit 4c19c68
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/new_resource_fab.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

import 'data/data.dart';

const _fabSize = 56.0;
final _borderRadius = BorderRadius.circular(_fabSize * 0.5);
@@ -14,8 +17,8 @@ class _NewResourceFabState extends State<NewResourceFab> {

bool _isOpen = false;

void _createNewResource(String id) {
// TODO: create a new resource
void _createNewResource(String id) async {
await Provider.of<Project>(context, listen: false).resourceBloc.add(id);
Scaffold.of(context).showSnackBar(SnackBar(
content: Text('Added resource $id 👍'),
));

0 comments on commit 4c19c68

Please sign in to comment.