'Drawer loads up after a lag

I have a flutter app with Home Page with a logo (10kb file) and a Drawer with only Text in it. However, when I press the hamburger icon on the Home Page, it takes a while before the drawer is opened.

I am currently trying this on debug mode but on the other apps I have developed, I never noticed this issue.

Can someone throw some light on this? My Home Page

import 'package:flutter/material.dart';
import 'package:max_e_vue/util/my_drawer.dart';

class HomeView extends StatefulWidget {
  const HomeView({Key? key}) : super(key: key);

  @override
  State<HomeView> createState() => _HomeViewState();
}

class _HomeViewState extends State<HomeView> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Colors.grey[700],
      ),
      body: Center(
        child: Image.asset('assets/logos/max_e_vue_logo.png'),
      ),
      backgroundColor: Colors.black,
      drawer: const MyDrawer(),
    );
  }
}

My Drawer

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:max_e_vue/util/my_Text_Widget.dart';

import '../screens/base_view.dart';

class MyDrawer extends StatelessWidget {
  const MyDrawer({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Drawer(
        backgroundColor: Colors.grey[700],
        child: ListView(
          children: [
            ListTile(
              leading: const Icon(Icons.dashboard),
              title: const MyTextWidget(text: 'Max-E-Vue', fontsize: 15),
              trailing: const Icon(Icons.arrow_forward),
              onTap: () {
                Get.to(() => const BaseView());
              },
            ),
            ListTile(
              leading: const Icon(Icons.dashboard),
              title: const MyTextWidget(text: 'Location', fontsize: 15),
              trailing: const Icon(Icons.arrow_forward),
              onTap: () {
                Get.to(() => const BaseView());
              },
            ),

          ],
        ));
  }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source