37 lines
1.1 KiB
Dart
37 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'package:smoke_cess_app/providers/audio_provider.dart';
|
|
import '../providers/timer_provider.dart';
|
|
import '../providers/workout_provider.dart';
|
|
import 'mute_button.dart';
|
|
import 'workout_timer_widget.dart';
|
|
|
|
class WorkoutForm extends StatelessWidget {
|
|
WorkoutForm({super.key});
|
|
|
|
final TimerProvider timerProvider = TimerProvider();
|
|
final AudioProvider audioProvider = AudioProvider();
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MultiProvider(
|
|
providers: [
|
|
ChangeNotifierProvider(create: (context) => timerProvider),
|
|
ChangeNotifierProvider(create: (context) => audioProvider),
|
|
ChangeNotifierProvider(
|
|
create: (context) =>
|
|
WorkoutProvider(timerProvider, audioProvider)),
|
|
],
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: const [
|
|
Align(
|
|
alignment: Alignment.topLeft,
|
|
child: MuteButton(),
|
|
),
|
|
WorkoutTimerWidget()
|
|
],
|
|
));
|
|
}
|
|
}
|