Skip to content

Commit

Permalink
cleanup some dart analysis errors
Browse files Browse the repository at this point in the history
  • Loading branch information
NeXTormer committed Mar 11, 2024
1 parent 9e86344 commit 851157a
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 24 deletions.
1 change: 0 additions & 1 deletion lib/screens/calendar_screen.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:frederic/backend/authentication/frederic_user_manager.dart';
Expand Down
1 change: 0 additions & 1 deletion lib/screens/edit_workout_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class _EditWorkoutScreenState extends State<EditWorkoutScreen> {

@override
Widget build(BuildContext context) {
var width = MediaQuery.of(context).size.width;
return FredericScaffold(
body: BlocBuilder<FredericWorkoutManager, FredericWorkoutListData>(
builder: (context, workoutListData) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'dart:io';
import 'dart:typed_data';

import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,6 @@ class _EditWorkoutActivityCardState extends State<EditWorkoutActivityCard> {
Future.delayed(widget.animationDuration)
.then((value) => widget.onDelete.call());
}

Size _textSize(String text, TextStyle? style) {
final TextPainter textPainter =
TextPainter(text: TextSpan(text: text, style: style), maxLines: 1)
..layout(minWidth: 0, maxWidth: double.infinity);
return textPainter.size;
}
}

class SelectSetsAndRepsPopup extends StatefulWidget {
Expand Down
14 changes: 2 additions & 12 deletions lib/widgets/standard_elements/frederic_date_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,6 @@ class _FredericDatePickerState extends State<FredericDatePicker> {
},
child: Container(
margin: EdgeInsets.only(right: 12),
decoration: true
? null
: BoxDecoration(
borderRadius: BorderRadius.circular(8),
border: Border.all(
color: theme.cardBorderColor, width: 0.6)),
child: _WeekDaysSliderDayButton(
dayIndex: index,
selectedDate: selectedDayIndex,
Expand Down Expand Up @@ -217,19 +211,15 @@ class _FredericDatePickerState extends State<FredericDatePicker> {
///
class _WeekDaysSliderDayButton extends StatelessWidget {
_WeekDaysSliderDayButton(
{required this.dayIndex,
required this.selectedDate,
required this.date,
this.dayWidth});
{required this.dayIndex, required this.selectedDate, required this.date});

final int dayIndex;
final int selectedDate;
final DateTime date;
final double? dayWidth;

@override
Widget build(BuildContext context) {
var width = dayWidth ?? (MediaQuery.of(context).size.width / 10);
var width = MediaQuery.of(context).size.width / 10;
return selectedDate == dayIndex
? Container(
width: width,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import 'package:frederic/widgets/standard_elements/frederic_card.dart';
import 'package:frederic/widgets/standard_elements/frederic_vertical_divider.dart';
import 'package:frederic/widgets/standard_elements/picture_icon.dart';

import '../../main.dart';

class ActivityPlayerActivityCard extends StatelessWidget {
ActivityPlayerActivityCard(this.activity,
{this.disabled = false, this.onTap, this.finished = false});
Expand Down

0 comments on commit 851157a

Please sign in to comment.