mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Move gym mode content into a SafeArea widget
This commit is contained in:
@@ -22,22 +22,22 @@ import 'package:wger/models/workouts/day.dart';
|
||||
import 'package:wger/providers/workout_plans.dart';
|
||||
import 'package:wger/widgets/workouts/gym_mode.dart';
|
||||
|
||||
class GymModeScreen extends StatefulWidget {
|
||||
class GymModeScreen extends StatelessWidget {
|
||||
static const routeName = '/gym-mode';
|
||||
|
||||
@override
|
||||
_GymModeScreenState createState() => _GymModeScreenState();
|
||||
}
|
||||
|
||||
class _GymModeScreenState extends State<GymModeScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final _day = ModalRoute.of(context)!.settings.arguments as Day;
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
body: Consumer<WorkoutPlans>(
|
||||
builder: (context, value, child) => GymMode(_day),
|
||||
body: SafeArea(
|
||||
child: Consumer<WorkoutPlans>(
|
||||
builder: (context, value, child) => Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 30),
|
||||
child: GymMode(_day),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -132,7 +132,6 @@ class StartPage extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 20),
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
@@ -231,7 +230,6 @@ class _LogPageState extends State<LogPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 20),
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
@@ -412,7 +410,6 @@ class ExerciseOverview extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 20),
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
@@ -471,7 +468,6 @@ class _SessionPageState extends State<SessionPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 20),
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
@@ -664,7 +660,6 @@ class _TimerWidgetState extends State<TimerWidget> {
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 20),
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
|
||||
Reference in New Issue
Block a user