Skip to content

Instantly share code, notes, and snippets.

☕️
coding

Felix Angelov felangel

View GitHub Profile
@felangel
felangel / loading_indicator.dart
Created Mar 16, 2019
[flutter_todos] loading indicator
View loading_indicator.dart
import 'package:flutter/material.dart';
class LoadingIndicator extends StatelessWidget {
LoadingIndicator({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Center(
child: CircularProgressIndicator(),
);
@felangel
felangel / delete_todo_snack_bar.dart
Created Mar 16, 2019
[flutter_todos] delete todo snackbar
View delete_todo_snack_bar.dart
import 'package:flutter/material.dart';
import 'package:todos_app_core/todos_app_core.dart';
import 'package:flutter_todos/models/models.dart';
class DeleteTodoSnackBar extends SnackBar {
final ArchSampleLocalizations localizations;
DeleteTodoSnackBar({
Key key,
@required Todo todo,
@felangel
felangel / todo_item.dart
Created Mar 16, 2019
[flutter_todos] todo item
View todo_item.dart
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:todos_app_core/todos_app_core.dart';
import 'package:flutter_todos/models/models.dart';
class TodoItem extends StatelessWidget {
final DismissDirectionCallback onDismissed;
final GestureTapCallback onTap;
final ValueChanged<bool> onCheckboxChanged;
final Todo todo;
@felangel
felangel / filtered_todos.dart
Created Mar 16, 2019
[flutter_todo] filtered todos
View filtered_todos.dart
import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:todos_app_core/todos_app_core.dart';
import 'package:flutter_todos/blocs/blocs.dart';
import 'package:flutter_todos/widgets/widgets.dart';
import 'package:flutter_todos/screens/screens.dart';
import 'package:flutter_todos/flutter_todos_keys.dart';
@felangel
felangel / tab_selector.dart
Created Mar 16, 2019
[flutter_todos] tab selector
View tab_selector.dart
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:todos_app_core/todos_app_core.dart';
import 'package:flutter_todos/models/models.dart';
class TabSelector extends StatelessWidget {
final AppTab activeTab;
final Function(AppTab) onTabSelected;
@felangel
felangel / extra_actions.dart
Created Mar 15, 2019
[flutter_todos] extra actions
View extra_actions.dart
import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:todos_app_core/todos_app_core.dart';
import 'package:flutter_todos/blocs/todos/todos.dart';
import 'package:flutter_todos/models/models.dart';
import 'package:flutter_todos/flutter_todos_keys.dart';
class ExtraActions extends StatelessWidget {
@felangel
felangel / filter_button.dart
Created Mar 15, 2019
[flutter_todos] filter button
View filter_button.dart
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:todos_app_core/todos_app_core.dart';
import 'package:flutter_todos/blocs/filtered_todos/filtered_todos.dart';
import 'package:flutter_todos/models/models.dart';
class FilterButton extends StatelessWidget {
final bool visible;
FilterButton({this.visible, Key key}) : super(key: key);
@felangel
felangel / screens.dart
Created Mar 15, 2019
[flutter_todos] screens barrel
View screens.dart
export './add_edit_screen.dart';
export './details_screen.dart';
export './home_screen.dart';
@felangel
felangel / add_edit_screen.dart
Created Mar 15, 2019
[flutter_todos] add/edit screen
View add_edit_screen.dart
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:todos_app_core/todos_app_core.dart';
import 'package:flutter_todos/models/models.dart';
typedef OnSaveCallback = Function(String task, String note);
class AddEditScreen extends StatefulWidget {
final bool isEditing;
final OnSaveCallback onSave;
@felangel
felangel / details_screen.dart
Created Mar 15, 2019
[flutter_todos] details screen
View details_screen.dart
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:todos_app_core/todos_app_core.dart';
import 'package:flutter_todos/blocs/todos/todos.dart';
import 'package:flutter_todos/screens/screens.dart';
import 'package:flutter_todos/flutter_todos_keys.dart';
class DetailsScreen extends StatelessWidget {
final String id;
You can’t perform that action at this time.