1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00
Files
samples/web/gallery/lib/demo/images_demo.dart
John Ryan dd14240dab Update flutter web samples (#161)
* update gallery and web samples

compatable with SDK version 2a576b774c:

Flutter 1.12.3-pre.38 • channel master • git@github.com:flutter/flutter.git
Framework • revision 2a576b774c (2 hours ago) • 2019-11-15 13:15:05 -0800
Engine • revision b2640d97e7
Tools • Dart 2.7.0

* add preview image
2019-11-15 15:29:51 -08:00

45 lines
1.3 KiB
Dart

// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import '../gallery/demo.dart';
class ImagesDemo extends StatelessWidget {
static const String routeName = '/images';
@override
Widget build(BuildContext context) {
return TabbedComponentDemoScaffold(
title: 'Animated images',
demos: <ComponentDemoTabData>[
ComponentDemoTabData(
tabName: 'WEBP',
description: '',
exampleCodeTag: 'animated_image',
demoWidget: Semantics(
label: 'Example of animated WEBP',
child: Image.asset(
'animated_images/animated_flutter_stickers.webp',
package: 'flutter_gallery_assets',
),
),
),
ComponentDemoTabData(
tabName: 'GIF',
description: '',
exampleCodeTag: 'animated_image',
demoWidget: Semantics(
label: 'Example of animated GIF',
child:Image.asset(
'animated_images/animated_flutter_lgtm.gif',
package: 'flutter_gallery_assets',
),
),
),
],
);
}
}