First, here is an example without using a theme. I can put const
on MaterialApp
.
import 'package:flutter/material.dart';
void main() {
runApp(const _MyApp());
}
class _MyApp extends StatelessWidget {
const _MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp( //