title: How do I add this intro page to my app in Flutter?
body: <p>I'm wanting to include the nice_intro package (<a href="https://pub.dev/packages/nice_intro" rel="nofollow noreferrer">https://pub.dev/packages/nice_intro</a> into my app that uses kfdrawer (<a href="https://pub.dev/packages/kf_drawer" rel="nofollow noreferrer">https://pub.dev/packages/kf_drawer</a>) for it's main navigation. The app shows no errors and compiles, but I lose connection to the device (emulator) as soon as it runs every time. Obviously I've done something wrong.</p>
  <p>Here is the main page (kfdrawer)</p>
  <pre><code>import 'package:flutter/cupertino.dart';
  import 'package:flutter/material.dart';
  import 'package:flutter_localizations/flutter_localizations.dart';
  import 'package:kf_drawer/kf_drawer.dart';
  //import 'package:sliding_drawer/screens/calendar_page.dart';
  
  //import 'package:manchestermaps/screens/auth_page.dart';
  import 'package:manchestermaps/screens/clusters_page.dart';
  import 'package:manchestermaps/screens/help_page.dart';
  import 'package:manchestermaps/screens/map_page.dart';
  import 'package:manchestermaps/screens/places_page.dart';
  import 'package:manchestermaps/screens/safety_info_page.dart';
  import 'package:manchestermaps/screens/settings_page.dart';
  import 'package:manchestermaps/utils/class_builder.dart';
  
  import 'package:manchestermaps/locale/locales.dart';
  import 'package:manchestermaps/theme.dart' as Theme;
  
  void main() {
    ClassBuilder.registerClasses();
    runApp(MyApp());
  }
  
  class MyApp extends StatelessWidget {
    // This widget is the root of your application.
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        localizationsDelegates: [
          // A class which loads the translations from JSON files
          AppLocalizationsDelegate(),
          // Built-in localization of basic text for Material screens
          GlobalMaterialLocalizations.delegate,
          // Built-in localization for text direction LTR/RTL
          GlobalWidgetsLocalizations.delegate,
          GlobalCupertinoLocalizations.delegate,
        ],
        supportedLocales: [
          Locale('en', ''),
          Locale('fr', ''),
          Locale('ar', ''),
          Locale('de', ''),
          Locale('es', ''),
          Locale('hi', ''),
          Locale('zh', ''),
          Locale('ja', '')
        ],
        theme: Theme.uniThemeData,
        home: MainWidget(),
      );
    }
  }
  
  class MainWidget extends StatefulWidget {
    MainWidget({Key key, this.title}) : super(key: key);
    final String title;
  
    @override
    _MainWidgetState createState() =&gt; _MainWidgetState();
  }
  
  class _MainWidgetState extends State&lt;MainWidget&gt; with TickerProviderStateMixin {
    KFDrawerController _drawerController;
  
    @override
    void initState() {
      super.initState();
    }
  
    @override
    void didChangeDependencies() {
      super.didChangeDependencies();
      _drawerController = KFDrawerController(
        initialPage: ClassBuilder.fromString('IntroPage'),
        items: [
          KFDrawerItem.initWithPage(
            text: Text(AppLocalizations.of(context).mainMenuCampusMap,
                style: TextStyle(color: Colors.white)),
            icon: Icon(
              Icons.home,
              color: Colors.white,
              semanticLabel: 'Display Menu',
            ),
            page: MapPage(),
          ),
          KFDrawerItem.initWithPage(
            text: Text(
              AppLocalizations.of(context).drawerPCClusters,
              style: TextStyle(color: Colors.white),
            ),
            icon: Icon(Icons.computer, color: Colors.white),
            page: ClustersPage(),
          ),
          KFDrawerItem.initWithPage(
            text: Text(
              AppLocalizations.of(context).mainMenuMyPlaces,
              style: TextStyle(color: Colors.white),
            ),
            icon: Icon(Icons.place, color: Colors.white),
            page: PlacesPage(),
          ),
          KFDrawerItem.initWithPage(
            text: Text(
              AppLocalizations.of(context).mainMenuSafetyInfo,
              style: TextStyle(color: Colors.white),
            ),
            icon: Icon(Icons.directions_bike, color: Colors.white),
            page: SafetyInfoPage(),
          ),
          KFDrawerItem.initWithPage(
            text: Text(
              AppLocalizations.of(context).mainMenuSettings,
              style: TextStyle(color: Colors.white),
            ),
            icon: Icon(Icons.settings, color: Colors.white),
            page: SettingsPage(),
          ),
        ],
      );
    }
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        body: KFDrawer(
  //        borderRadius: 0.0,
  //        shadowBorderRadius: 0.0,
  //        menuPadding: EdgeInsets.all(0.0),
  //        scrollable: true,
          controller: _drawerController,
          header: Align(
            alignment: Alignment.centerLeft,
            child: Container(
              padding: EdgeInsets.symmetric(horizontal: 16.0),
              width: MediaQuery.of(context).size.width * 0.6,
              child: ExcludeSemantics(
                excluding: true,
                child: Image.asset(
                  'assets/imgs/generic/colourLogo.png',
                  alignment: Alignment.centerLeft,
                ),
              ),
            ),
          ),
          footer: KFDrawerItem(
            text: Text(
              AppLocalizations.of(context).mainMenuHelp,
              style: TextStyle(color: Colors.white),
            ),
            icon: Icon(
              Icons.help_outline,
              color: Colors.white,
            ),
            onPressed: () {
              Navigator.of(context).push(CupertinoPageRoute(
                fullscreenDialog: true,
                builder: (BuildContext context) {
                  return HelpPage();
                },
              ));
            },
          ),
          decoration: BoxDecoration(
            gradient: LinearGradient(
              begin: Alignment.topRight,
              end: Alignment.bottomLeft,
              stops: [0.1, 0.7, 1.0],
              colors: [
                Theme.UniColour.secondary[300],
                Theme.UniColour.primary[300],
                Theme.UniColour.primary[700]
              ],
            ),
          ),
        ),
      );
    }
  }
  </code></pre>
  <p>Here is the Intro Page code (This is my problem page)</p>
  <pre><code>import 'package:flutter/material.dart';
  import 'package:kf_drawer/kf_drawer.dart';
  import 'package:manchestermaps/locale/locales.dart';
  import 'package:nice_intro/intro_screen.dart';
  import 'package:nice_intro/intro_screens.dart';
  
  import 'package:manchestermaps/theme.dart' as Theme;
  
  class IntroPage extends KFDrawerContent {
    @override
    _IntroWidgetState createState() =&gt; _IntroWidgetState();
  }
  
  class IntroWidget extends StatefulWidget {
    IntroWidget({Key key, this.title}) : super(key: key);
    final String title;
  
    @override
    _IntroWidgetState createState() =&gt; _IntroWidgetState();
  }
  
  class _IntroWidgetState extends State&lt;IntroPage&gt; with TickerProviderStateMixin {
    double _fontSize = 14.0;
    final double _baseFontSize = 14.0;
    double _fontScale = 1.0;
    double _baseFontScale = 1.0;
    double _maxScale = 2.2;
  
    @override
    Widget build(BuildContext context) {
      return GestureDetector(
        onScaleStart: (ScaleStartDetails caleStartDetails) {
          _baseFontScale = _fontScale;
        },
        onScaleUpdate: (ScaleUpdateDetails scaleUpdateDetails) {
          setState(() {
            _fontScale =
                (_baseFontScale * scaleUpdateDetails.scale).clamp(1.0, _maxScale);
            _fontSize = _fontScale * _baseFontSize;
          });
        },
        child: SafeArea(
          minimum: EdgeInsets.fromLTRB(0.0, 0.0, 0.0, -10.0),
          child: Material(
            child: Center(
              child: Column(
                children: &lt;Widget&gt;[
                  Row(
                    children: &lt;Widget&gt;[
                      ClipRRect(
                        borderRadius: BorderRadius.all(Radius.circular(32.0)),
                        child: Material(
                          shadowColor: Colors.transparent,
                          color: Colors.transparent,
                          child: IconButton(
                            icon: Icon(
                              Icons.menu,
                              color: Colors.black,
                              size: 32.0,
                              semanticLabel: 'Display Main Menu',
                            ),
                            onPressed: widget.onMenuPressed,
                          ),
                        ),
                      ),
                      Text(
                        'Press for Main Menu',
                        style: TextStyle(color: Colors.black),
                      ),
                    ],
                  ),
                  Expanded(
                    child: _introduction(context),
                  ),
                ],
              ),
            ),
          ),
        ),
      );
    }
  }
  
  @override
  Widget _introduction(BuildContext context) {
    var screens = IntroScreens(
      onDone: () =&gt; Navigator.of(context).push(
        MaterialPageRoute(
          builder: (context) =&gt; NextPage(),
        ),
      ),
      onSkip: () =&gt; print('Skipping the intro slides'),
      footerBgColor: Theme.UniColour.primary[900],
      activeDotColor: Colors.white,
      footerRadius: 18.0,
  //      indicatorType: IndicatorType.CIRCLE,
      slides: [
        IntroScreen(
          title: 'Search',
          imageAsset: 'assets/imgs/intro/1.png',
          description: 'Quickly find all your messages',
          headerBgColor: Colors.white,
        ),
        IntroScreen(
          title: 'Focused Inbox',
          headerBgColor: Colors.white,
          imageAsset: 'assets/imgs/intro/2.png',
          description: &quot;We've put your most important, actionable emails here&quot;,
        ),
        IntroScreen(
          title: 'Social',
          headerBgColor: Colors.white,
          imageAsset: 'assets/imgs/intro/3.png',
          description: &quot;Keep talking with your mates&quot;,
        ),
      ],
    );
  
    return screens;
  }
  
  class NextPage extends StatefulWidget {
    @override
    _NextPageState createState() =&gt; _NextPageState();
  }
  
  class _NextPageState extends State&lt;NextPage&gt; {
    @override
    Widget build(BuildContext context) {
      return Container(
        color: Colors.white,
      );
    }
  }
  </code></pre>
  <p>I have been fighting for 3 years to be allowed to develop this and finally word is getting out. It is gaining some momentum and management are asking for a progress report and a demo of it. I do have something to show them, but this would be a nice addition, which shows a bit of professionalism in my thinking.</p>
  <p>Any help would be appreciated.</p>
  <p>thanks</p>