mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
38 lines
1006 B
Dart
38 lines
1006 B
Dart
// Copyright 2018 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';
|
|
|
|
class GalleryTextScaleValue {
|
|
const GalleryTextScaleValue(this.scale, this.label);
|
|
|
|
final double scale;
|
|
final String label;
|
|
|
|
@override
|
|
bool operator ==(dynamic other) {
|
|
if (runtimeType != other.runtimeType)
|
|
return false;
|
|
final GalleryTextScaleValue typedOther = other;
|
|
return scale == typedOther.scale && label == typedOther.label;
|
|
}
|
|
|
|
@override
|
|
int get hashCode => hashValues(scale, label);
|
|
|
|
@override
|
|
String toString() {
|
|
return '$runtimeType($label)';
|
|
}
|
|
|
|
}
|
|
|
|
const List<GalleryTextScaleValue> kAllGalleryTextScaleValues = <GalleryTextScaleValue>[
|
|
GalleryTextScaleValue(null, 'System Default'),
|
|
GalleryTextScaleValue(0.8, 'Small'),
|
|
GalleryTextScaleValue(1.0, 'Normal'),
|
|
GalleryTextScaleValue(1.3, 'Large'),
|
|
GalleryTextScaleValue(2.0, 'Huge'),
|
|
];
|