Flutter-Ernaehrungsapp/lib/android/components/circular/line_circular_with_text_com...

39 lines
1.2 KiB
Dart
Raw Normal View History

import 'package:ernaehrung/android/components/meal_page_text/statistics_text_component.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:percent_indicator/linear_percent_indicator.dart';
class LineCircularWiTextComponent extends StatelessWidget {
final Color progressColor;
final double percent;
final int left;
final int total;
final String textName;
const LineCircularWiTextComponent(
this.progressColor, this.percent, this.left, this.total, this.textName,
{super.key});
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 0, horizontal: 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
StaticsTextComponent(left.toString(), true),
const SizedBox(height: 4,),
LinearPercentIndicator(
padding: EdgeInsets.zero,
lineHeight: 8.0,
percent: 0.9,
progressColor: progressColor,
),
const SizedBox(height: 4,),
StaticsTextComponent(textName, false),
],
),
);
}
}