-
Notifications
You must be signed in to change notification settings - Fork 0
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 #84 from praveenkrishna0512/sharecredits
share credits for lending listings
- Loading branch information
Showing
11 changed files
with
109 additions
and
15 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// share credits rewards page | ||
// only for lending / borrowing listings | ||
|
||
import 'package:flutter/material.dart'; | ||
import 'package:flutter/src/foundation/key.dart'; | ||
import 'package:flutter/src/widgets/framework.dart'; | ||
import 'package:justsharelah_v1/utils/appbar.dart'; | ||
import 'package:justsharelah_v1/utils/const_templates.dart'; | ||
|
||
class ShareCreditsScreen extends StatefulWidget { | ||
const ShareCreditsScreen({Key? key}) : super(key: key); | ||
|
||
@override | ||
State<ShareCreditsScreen> createState() => ShareCreditsScreenState(); | ||
} | ||
|
||
class ShareCreditsScreenState extends State<ShareCreditsScreen> { | ||
ElevatedButton buildButtonField( | ||
String text, Color color, double length, void Function()? onPressed) { | ||
return ElevatedButton( | ||
onPressed: onPressed, | ||
style: ElevatedButton.styleFrom( | ||
padding: EdgeInsets.symmetric(horizontal: length), | ||
primary: color, | ||
shape: | ||
RoundedRectangleBorder(borderRadius: BorderRadius.circular(30))), | ||
child: Text( | ||
text, | ||
style: const TextStyle( | ||
fontSize: 15, letterSpacing: 2.5, color: Colors.black), | ||
), | ||
); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
body: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
Image.asset("images/sharecredits.png"), | ||
Container( | ||
alignment: Alignment.center, | ||
padding: const EdgeInsets.only(left: 15, right: 20, top: 15), | ||
child: Text( | ||
"Congratulations! You have earned 20 ShareCredits !", | ||
style: kHeadingText.copyWith(backgroundColor: Colors.greenAccent), | ||
textAlign: TextAlign.center, | ||
), | ||
), | ||
const SizedBox( | ||
height: 50, | ||
), | ||
buildButtonField("Yay, Thanks!", Colors.green, 20, () { | ||
Navigator.pushReplacementNamed(context, "/profile"); | ||
}) | ||
], | ||
)); | ||
} | ||
} |
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