-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from just-ary27/main
Fix #138
- Loading branch information
Showing
10 changed files
with
195 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_riverpod/flutter_riverpod.dart'; | ||
|
||
class IssueFlagButton extends ConsumerStatefulWidget { | ||
const IssueFlagButton({Key? key}) : super(key: key); | ||
|
||
@override | ||
ConsumerState<ConsumerStatefulWidget> createState() => | ||
_IssueFlagButtonState(); | ||
} | ||
|
||
class _IssueFlagButtonState extends ConsumerState<IssueFlagButton> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
width: 25, | ||
child: Row( | ||
children: [ | ||
IconButton( | ||
onPressed: () {}, | ||
icon: Icon( | ||
Icons.bookmark, | ||
), | ||
), | ||
Text(""), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_riverpod/flutter_riverpod.dart'; | ||
|
||
class IssueLikeButton extends ConsumerStatefulWidget { | ||
const IssueLikeButton({Key? key}) : super(key: key); | ||
|
||
@override | ||
ConsumerState<ConsumerStatefulWidget> createState() => | ||
_IssueLikeButtonState(); | ||
} | ||
|
||
class _IssueLikeButtonState extends ConsumerState<IssueLikeButton> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
width: 25, | ||
child: Row( | ||
children: [ | ||
IconButton( | ||
onPressed: () {}, | ||
icon: Icon( | ||
Icons.favorite, | ||
), | ||
), | ||
Text(""), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import 'package:flutter_riverpod/flutter_riverpod.dart'; | ||
|
||
final issueLikeProvider = StateNotifierProvider<IssueLikeNotifier, Map>( | ||
((ref) => IssueLikeNotifier(ref.read)), | ||
); | ||
var issueFlagProvider; | ||
|
||
class IssueLikeNotifier extends StateNotifier<Map> { | ||
final Reader read; | ||
Map? previousState; | ||
|
||
IssueLikeNotifier(this.read, [Map? likeState]) | ||
: super(likeState ?? {'likeCount': 0, 'liked': false}); | ||
} | ||
|
||
class IssueFlagNotifier {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters