images_demo.dart 1.25 KB
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5 6 7 8 9 10 11 12 13
import 'package:flutter/material.dart';

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

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

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