-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* beginning structure, wip * Filters mostly working now (except Category) Filters mostly working now (except Category) * removed commented code removed commented code * Implemented Filtering changes (except for categories) Implemented Filtering changes (except for categories) * removed api keys from server env * Enrollment type enum * fixed filtering bugs after merging * added friendly names, fixed category filtering * Achievements Page UI work * fixed miles away value in preview * fix bug where listview breaks * fix formatting * Achievements UI no backend * Achievement model blocked by achievementTracker\ * UI adjustments * Achievements UI completed, Hint icon fixed * fixed issues caused by conflict, edited cells on profile page * removed some old print statements --------- Co-authored-by: nit0107 <[email protected]> Co-authored-by: Nitya <[email protected]> Co-authored-by: cathli66 <[email protected]> Co-authored-by: neketka <[email protected]> Co-authored-by: cathli66 <[email protected]>
- Loading branch information
1 parent
e5bca96
commit 9fb3ae8
Showing
27 changed files
with
632 additions
and
197 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
2 changes: 1 addition & 1 deletion
2
game/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
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,159 @@ | ||
import 'package:flutter/cupertino.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter/rendering.dart'; | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:game/preview/preview.dart'; | ||
import 'package:flutter_svg/flutter_svg.dart'; | ||
|
||
class LoadingBar extends StatelessWidget { | ||
final int totalTasks; | ||
final int tasksFinished; | ||
|
||
const LoadingBar( | ||
this.tasksFinished, | ||
this.totalTasks, | ||
); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Row( | ||
children: [ | ||
Container( | ||
width: 200, | ||
child: LayoutBuilder( | ||
builder: (BuildContext context, BoxConstraints constraints) { | ||
return Stack(children: [ | ||
Container( | ||
width: constraints.maxWidth, | ||
height: 13, | ||
alignment: Alignment.centerLeft, | ||
child: Container( | ||
decoration: new BoxDecoration( | ||
color: Color.fromARGB(255, 241, 241, 241), | ||
shape: BoxShape.rectangle, | ||
borderRadius: BorderRadius.all(Radius.circular(16.0)), | ||
), | ||
), | ||
), | ||
Container( | ||
width: (totalTasks > 0 ? tasksFinished / totalTasks : 0) * | ||
constraints.maxWidth, | ||
height: 13, | ||
alignment: Alignment.centerLeft, | ||
child: Container( | ||
decoration: new BoxDecoration( | ||
color: Color.fromARGB(197, 237, 86, 86), | ||
shape: BoxShape.rectangle, | ||
borderRadius: BorderRadius.all(Radius.circular(16.0)), | ||
), | ||
), | ||
), | ||
Container( | ||
height: 3, | ||
width: (totalTasks > 0 ? tasksFinished / totalTasks : 0) * | ||
constraints.maxWidth - | ||
16, | ||
margin: EdgeInsets.only(left: 8, top: 3), | ||
alignment: Alignment.centerLeft, | ||
decoration: new BoxDecoration( | ||
color: Color(0x99F3C6C6), | ||
shape: BoxShape.rectangle, | ||
borderRadius: BorderRadius.all(Radius.circular(5.0)), | ||
), | ||
), | ||
]); | ||
})), | ||
Padding( | ||
padding: const EdgeInsets.only(left: 8.0), | ||
child: Text( | ||
tasksFinished.toString() + "/" + totalTasks.toString(), | ||
), | ||
), | ||
], | ||
); | ||
} | ||
} | ||
|
||
class AchievementCell extends StatefulWidget { | ||
final SvgPicture thumbnail; | ||
final String description; | ||
final int tasksFinished; | ||
final int totalTasks; | ||
|
||
const AchievementCell( | ||
this.description, this.thumbnail, this.tasksFinished, this.totalTasks, | ||
{Key? key}) | ||
: super(key: key); | ||
|
||
@override | ||
State<StatefulWidget> createState() => | ||
_AchievementCellState(description, thumbnail, tasksFinished, totalTasks); | ||
} | ||
|
||
class _AchievementCellState extends State<AchievementCell> { | ||
final String description; | ||
final SvgPicture thumbnail; | ||
final int tasksFinished; | ||
final int totalTasks; | ||
// newly added field | ||
// final int totalDistance; | ||
|
||
_AchievementCellState( | ||
this.description, this.thumbnail, this.tasksFinished, this.totalTasks | ||
// newly added field | ||
// this.totalDistance | ||
); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return GestureDetector( | ||
onTap: () async {}, | ||
child: Container( | ||
padding: EdgeInsets.all(5), | ||
decoration: BoxDecoration( | ||
color: Colors.white, | ||
borderRadius: BorderRadius.circular(15), | ||
boxShadow: [ | ||
BoxShadow( | ||
color: Color.fromARGB(255, 198, 198, 198), | ||
blurRadius: 2, | ||
offset: Offset(0, 4), | ||
), | ||
], | ||
), | ||
child: Container( | ||
margin: EdgeInsets.all(10), | ||
height: 64, | ||
child: Row( | ||
children: [ | ||
Container(margin: EdgeInsets.only(right: 12), child: thumbnail), | ||
Column( | ||
mainAxisSize: MainAxisSize.max, | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
Align( | ||
alignment: Alignment.centerLeft, | ||
child: Text( | ||
description, | ||
style: TextStyle( | ||
color: Color.fromARGB(204, 0, 0, 0), | ||
fontSize: 14, | ||
fontFamily: 'Poppins', | ||
fontWeight: FontWeight.w500, | ||
), | ||
), | ||
), | ||
Spacer(), | ||
Align( | ||
alignment: Alignment.bottomCenter, | ||
child: LoadingBar(3, 4)), | ||
], | ||
) | ||
], | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.