init refilc-plus
This commit is contained in:
commit
6edc2029bd
37 changed files with 6988 additions and 0 deletions
34
lib/ui/mobile/goal_planner/grade_display.dart
Normal file
34
lib/ui/mobile/goal_planner/grade_display.dart
Normal file
|
@ -0,0 +1,34 @@
|
|||
import 'package:refilc/models/settings.dart';
|
||||
import 'package:refilc_plus/ui/mobile/goal_planner/goal_input.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class GradeDisplay extends StatelessWidget {
|
||||
const GradeDisplay({super.key, required this.grade});
|
||||
|
||||
final int grade;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SettingsProvider settings = Provider.of<SettingsProvider>(context);
|
||||
|
||||
return Container(
|
||||
width: 36,
|
||||
height: 36,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: gradeColor(grade, settings).withOpacity(.3),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
grade.toInt().toString(),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 22.0,
|
||||
color: gradeColor(grade, settings),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue