You should use GetMaterialApp widget instead of MaterialApp since its the widget from get package
Example:
import 'package:flutter/material.dart';
import 'package:get/get.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return GetMaterialApp(
title: 'My App',
theme: ThemeData(
scaffoldBackgroundColor: const Color(0xff262626),
brightness: Brightness.dark,
),
initialRoute: '/',
getPages: [
GetPage(name: '/', page: () => HomePage()),
],
);
}
}