images_demo.dart 1.29 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
import 'package:flutter/material.dart';

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

class ImagesDemo extends StatelessWidget {
10
  const ImagesDemo({super.key});
11

12 13 14 15
  static const String routeName = '/images';

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