Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion animation/lib/src/screens/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class HomeState extends State<Home> with TickerProviderStateMixin {
body: GestureDetector(
child: Center(
child: Stack(
overflow: Overflow.visible,
clipBehavior: Clip.none,
children: [
buildCatAnimation(),
buildBox(),
Expand Down
14 changes: 0 additions & 14 deletions login_bloc/lib/src/blocs/provider.dart

This file was deleted.

2 changes: 1 addition & 1 deletion login_bloc/lib/src/screens/login_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class LoginScreen extends StatelessWidget {
return RaisedButton(
child: Text('Login'),
color: Colors.blue,
onPressed: snapshot.hasData ? bloc.submit : null,
onPressed: snapshot.hasData || snapshot.data == null ? bloc.submit : null,
);
},
);
Expand Down
3 changes: 1 addition & 2 deletions news/lib/src/blocs/comments_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ class CommentsProvider extends InheritedWidget {
bool updateShouldNotify(_) => true;

static CommentsBloc of(BuildContext context) {
return (context.inheritFromWidgetOfExactType(CommentsProvider)
as CommentsProvider)
return (context.dependOnInheritedWidgetOfExactType<CommentsProvider>())
.bloc;
}
}
4 changes: 2 additions & 2 deletions news/lib/src/blocs/stories_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ class StoriesBloc {
final _itemsFetcher = PublishSubject<int>();

// Getters to Streams
Observable<List<int>> get topIds => _topIds.stream;
Observable<Map<int, Future<ItemModel>>> get items => _itemsOutput.stream;
Stream<List<int>> get topIds => _topIds.stream;
Stream<Map<int, Future<ItemModel>>> get items => _itemsOutput.stream;

// Getters to Sinks
Function(int) get fetchItem => _itemsFetcher.sink.add;
Expand Down
4 changes: 1 addition & 3 deletions news/lib/src/blocs/stories_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ class StoriesProvider extends InheritedWidget {
bool updateShouldNotify(_) => true;

static StoriesBloc of(BuildContext context) {
return (context.inheritFromWidgetOfExactType(StoriesProvider)
as StoriesProvider)
.bloc;
return (context.dependOnInheritedWidgetOfExactType<StoriesProvider>()).bloc;
}
}
42 changes: 31 additions & 11 deletions news/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,45 @@
name: news
description: A new Flutter project.

# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1

environment:
sdk: ">=2.7.0 <3.0.0"

dependencies:
flutter:
sdk: flutter
sqflite: ^1.3.1+2
path_provider: ^1.6.22
http: ^0.12.2
rxdart: ^0.24.1

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2

sqflite: ^0.10.0
path_provider: ^0.4.1
rxdart: ^0.18.0
cupertino_icons: ^1.0.0

dev_dependencies:
flutter_test:
sdk: flutter
test: ^1.15.4


# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:
Expand All @@ -31,14 +51,14 @@ flutter:

# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg

# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.io/assets-and-images/#resolution-aware.
# https://flutter.dev/assets-and-images/#resolution-aware.

# For details regarding adding assets from package dependencies, see
# https://flutter.io/assets-and-images/#from-packages
# https://flutter.dev/assets-and-images/#from-packages

# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
Expand All @@ -58,4 +78,4 @@ flutter:
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.io/custom-fonts/#from-packages
# see https://flutter.dev/custom-fonts/#from-packages