iOS Development

ios – Issues with theming scaffold in flutter

I encountered 2 fundamental issues when theming the scaffold of my app:

Look first on the app bar and you may see it is a colour totally different from the scaffold (one thing like my main colour with opacity) though I designed it to be just like the scaffold. The second downside is that on the backside of the scaffold there’s a part not styled (perhaps as a result of I am utilizing a SafeArea idk).

Right here is the Theme information I am utilizing:

last theme = ThemeData(

  useMaterial3: true,
  colorScheme: const ColorScheme(
    brightness: Brightness.mild,
    main: Colour.fromRGBO(248, 95, 106, 1),
    onPrimary: Colours.white,
    secondary: Colour.fromRGBO(167, 183, 216, 1),
    onSecondary: Colours.white,
    onError: Colours.white,
    background: Colour.fromARGB(240, 252, 251, 244),
    floor: Colours.black45,

And right here is the code of the display:

import 'package deal:flutter/materials.dart';
import 'package deal:jimprova/fashions/workout_model.dart';
import 'package deal:jimprova/widgets/coaching/exercise_training_card.dart';

class TrainingScreen extends StatefulWidget {
  const TrainingScreen({
    required this.exercise,

  last Exercise exercise;

  State<TrainingScreen> createState() => _TrainingScreenState();

class _TrainingScreenState extends State<TrainingScreen> {
  int indexEx = 0;

  Widget construct(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.background,
        title: Textual content(
          type: Theme.of(context).textTheme.titleLarge!.copyWith(
                colour: Theme.of(context).colorScheme.onBackground,
                fontWeight: FontWeight.daring,
      physique: SafeArea(
        youngster: Stack(
          youngsters: [
                    // rest of the code... (there are only rows, columns and a listview.builder)


Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button