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
14 changes: 8 additions & 6 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,14 @@ class _MyHomePageState extends State<MyHomePage> {
)
],
onTap: (index) {
_pageController.animateToPage(index,
duration: const Duration(milliseconds: 300),
curve: Curves.easeOutCubic);
setState(() {
_currentIndex = index;
});
if (_currentIndex != index) {
_pageController.animateToPage(index,
duration: const Duration(milliseconds: 300),
curve: Curves.easeOutCubic);
setState(() {
_currentIndex = index;
});
}
},
),
drawer: Drawer(
Expand Down
29 changes: 29 additions & 0 deletions lib/src/article.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions lib/src/favorites.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ part 'favorites.g.dart';
class Favorites extends Table {
// article id
IntColumn get id => integer().customConstraint('UNIQUE')();

TextColumn get title => text()();

TextColumn get url => text()();

TextColumn get category => text().nullable()();
}

Expand Down
23 changes: 23 additions & 0 deletions lib/src/favorites.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/src/notifiers/hn_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class HackerNewsTab with ChangeNotifier {
List<Article> _articles = [];

bool _isLoading = false;

bool get isLoading => _isLoading;

final IconData icon;
Expand Down