images_demo.dart 1.09 KB
Newer Older
1 2 3 4 5 6 7 8 9
import 'package:flutter/material.dart';

import '../gallery/demo.dart';

class ImagesDemo extends StatelessWidget {
  static const String routeName = '/images';

  @override
  Widget build(BuildContext context) {
10
    return TabbedComponentDemoScaffold(
11 12
      title: 'Animated images',
      demos: <ComponentDemoTabData>[
13
        ComponentDemoTabData(
14
          tabName: 'WEBP',
15 16
          description: '',
          exampleCodeTag: 'animated_image',
17
          demoWidget: Semantics(
18
            label: 'Example of animated WEBP',
19
            child: Image.asset(
20
              'animated_images/animated_flutter_stickers.webp',
21 22
              package: 'flutter_gallery_assets',
            ),
23
          ),
24
        ),
25
        ComponentDemoTabData(
26
          tabName: 'GIF',
27 28
          description: '',
          exampleCodeTag: 'animated_image',
29
          demoWidget: Semantics(
30
            label: 'Example of animated GIF',
31
            child:Image.asset(
32
              'animated_images/animated_flutter_lgtm.gif',
33 34
              package: 'flutter_gallery_assets',
            ),
35
          ),
36 37 38 39 40
        ),
      ]
    );
  }
}