import 'package:businesscard/cubits/get_weather_cubits/get_weather_cubit.dart';
import 'package:businesscard/cubits/get_weather_cubits/get_weather_states.dart';
import 'package:businesscard/screens/searchPage.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import '../widgets/No_weather.dart';
import '../widgets/Weather_info.dart';
class HomeScreen extends StatelessWidget {
  const HomeScreen({super.key});
  @override
  Widget build(BuildContext context) {
    return BlocProvider(
      create: (context) => GetWeatherCubit(),
      child: Builder(
        builder: (context) =>    MaterialApp(
          theme: ThemeData(
            primarySwatch: getWeatherColor(
                BlocProvider.of<GetWeatherCubit>(context)
                    .weather
                    ?.weatherstatus),
          ),
          debugShowCheckedModeBanner: false,
          home: const  HomeBage(),
        ),
      ),
    );
  }
}
 
 here i need to change the theme of the app but no action acquire even the app bar did not have the default color
here i need to change the theme of the app but no action acquire even the app bar did not have the default color
i tried to give the app bar a color it appears but the themes still do not change
 
                        
You can specify the default app bar color in your
ThemeData:Or if what you want is the app bar style to behave just like in Material 2, then you can opt out of Material 3: