• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2018 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5import 'package:flutter/material.dart';
6
7class GalleryTextScaleValue {
8  const GalleryTextScaleValue(this.scale, this.label);
9
10  final double scale;
11  final String label;
12
13  @override
14  bool operator ==(dynamic other) {
15    if (runtimeType != other.runtimeType)
16      return false;
17    final GalleryTextScaleValue typedOther = other;
18    return scale == typedOther.scale && label == typedOther.label;
19  }
20
21  @override
22  int get hashCode => hashValues(scale, label);
23
24  @override
25  String toString() {
26    return '$runtimeType($label)';
27  }
28
29}
30
31const List<GalleryTextScaleValue> kAllGalleryTextScaleValues = <GalleryTextScaleValue>[
32  GalleryTextScaleValue(null, 'System Default'),
33  GalleryTextScaleValue(0.8, 'Small'),
34  GalleryTextScaleValue(1.0, 'Normal'),
35  GalleryTextScaleValue(1.3, 'Large'),
36  GalleryTextScaleValue(2.0, 'Huge'),
37];
38