title: how to fix type string is not a subtype of type widget in below flutter code
body: <p>here is my code to add carousel slider in app</p>
  
  <p><strong>homescreen.dart</strong></p>
  
  <pre><code>import 'package:eat_healthy/caroslider.dart';
  import 'package:flutter/material.dart';
  import 'package:gradient_app_bar/gradient_app_bar.dart';
  import 'package:share/share.dart';
  import 'package:eat_healthy/drawer.dart';
  import 'package:dynamic_theme/dynamic_theme.dart';
  import 'package:dynamic_theme/theme_switcher_widgets.dart';
  
  
  
  
  
  class HomeScreen extends StatefulWidget {
    HomeScreen({Key key, this.title}) : super(key: key);
    final String title;
  
    @override
    _MyHomePageState createState() =&gt; _MyHomePageState();
  }
  
  class _MyHomePageState extends State&lt;HomeScreen&gt; {
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: GradientAppBar(
          gradient: LinearGradient(
              colors: [Colors.deepPurple, Colors.deepPurpleAccent, Colors.purple]),
          actions: &lt;Widget&gt;[
            IconButton(
                icon: Icon(
                  Icons.share,
                  color: Colors.white,
                ),
                onPressed: () {
                  Share.share('Installl this app to know about health benefits of apple ');
                })
          ],
        ),
        drawer: AppDrawer(),
        body: Stack(
          fit: StackFit.expand,
          children: &lt;Widget&gt;[
  
   CaroSlider() 
  
          ],
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: showChooser,
          child: const Icon(Icons.add),
        ),);
  
    }
  
    void showChooser() {
      showDialog&lt;void&gt;(
          context: context,
          builder: (context) {
            return BrightnessSwitcherDialog(
              onSelectedTheme: (brightness) {
                DynamicTheme.of(context).setBrightness(brightness);
              },
            );
          });
    }
  
  
  }
  
  </code></pre>
  
  <p><strong>Caroslider.dart</strong></p>
  
  <pre><code>import 'package:carousel_pro/carousel_pro.dart';
  import 'package:flutter/material.dart';
  
  
  
  
  final myCarousel = Carousel(
    dotSize: 5.0,
    dotIncreaseSize: 2.0,
    borderRadius: true,
    radius: Radius.circular(10.0),
    animationCurve: Curves.easeInOut,
    animationDuration: Duration(seconds: 2),
    images: [
      'https://images.unsplash.com/photo-1520342868574-5fa3804e551c?ixlib=rb-0.3.5&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;s=6ff92caffcdd63681a35134a6770ed3b&amp;auto=format&amp;fit=crop&amp;w=1951&amp;q=80',
      'https://images.unsplash.com/photo-1522205408450-add114ad53fe?ixlib=rb-0.3.5&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;s=368f45b0888aeb0b7b08e3a1084d3ede&amp;auto=format&amp;fit=crop&amp;w=1950&amp;q=80',
      'https://images.unsplash.com/photo-1519125323398-675f0ddb6308?ixlib=rb-0.3.5&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;s=94a1e718d89ca60a6337a6008341ca50&amp;auto=format&amp;fit=crop&amp;w=1950&amp;q=80',
      'https://images.unsplash.com/photo-1523205771623-e0faa4d2813d?ixlib=rb-0.3.5&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;s=89719a0d55dd05e2deae4120227e6efc&amp;auto=format&amp;fit=crop&amp;w=1953&amp;q=80',
      'https://images.unsplash.com/photo-1508704019882-f9cf40e475b4?ixlib=rb-0.3.5&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;s=8c6e5e3aba713b17aa1fe71ab4f0ae5b&amp;auto=format&amp;fit=crop&amp;w=1352&amp;q=80',
      'https://images.unsplash.com/photo-1519985176271-adb1088fa94c?ixlib=rb-0.3.5&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;s=a0c8d632e977f94e5d312d9893258f59&amp;auto=format&amp;fit=crop&amp;w=1355&amp;q=80',
    ],
  );
  
  
  
  
  
  
  
  
  class CaroSlider extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return Padding(
          padding: EdgeInsets.symmetric(vertical: 15.0),
          child:myCarousel
          );
    }
  }                                                   
  
  </code></pre>
  
  <p>What is wrong in Caroslider code.</p>
  
  <blockquote>
    <p>I/flutter ( 3766): The following assertion was thrown building
    Carousel(dirty, state: CarouselState#7c7de): I/flutter ( 3766): type
    'String' is not a subtype of type 'Widget' I/flutter ( 3766): 
    I/flutter ( 3766): Either the assertion indicates an error in the
    framework itself, or we should provide substantially I/flutter (
    3766): more information in this error message to help you determine
    and fix the underlying cause.</p>
  </blockquote>