Move gym mode content into a SafeArea widget

This commit is contained in:
Roland Geider
2021-04-10 12:25:34 +02:00
parent b3dc1d23cb
commit 78c70c7918
2 changed files with 8 additions and 13 deletions

View File

@@ -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),
),
),
),
);
}

View File

@@ -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(