1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00
Files
samples/experimental/varfont_shader_puzzle/lib/styles.dart
Eric Windmill 3172aff8f8 Updates for 3.22 (#2266)
Updates for 3.22

---------

Co-authored-by: Brett Morgan <brettmorgan@google.com>
Co-authored-by: Qun Cheng <chengqunq@gmail.com>
Co-authored-by: Brett Morgan <brett.morgan@gmail.com>
2024-05-14 10:37:24 -04:00

51 lines
1.3 KiB
Dart

// Copyright 2023 The Flutter team. 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 TextStyles {
const TextStyles({Key? key});
static TextStyle bodyStyle() {
return const TextStyle(
fontFamily: 'Roboto',
fontSize: 16,
color: Colors.black,
fontWeight: FontWeight.w400,
height: 1.5,
);
}
static TextStyle headlineStyle() {
return const TextStyle(
fontFamily: 'Roboto',
fontSize: 16,
color: Colors.black,
fontWeight: FontWeight.w700,
height: 1.5,
);
}
}
class ButtonStyles {
static ButtonStyle style() {
return ButtonStyle(
fixedSize: WidgetStateProperty.resolveWith<Size>((states) {
return const Size(100, 36);
}),
shape: WidgetStateProperty.resolveWith<OutlinedBorder>((states) {
return const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(18)));
}),
overlayColor: null,
backgroundColor: WidgetStateProperty.resolveWith<Color?>((states) {
if (states.contains(WidgetState.hovered)) {
return Colors.black; // Hovered bg (for desktop with mouse)
}
return Colors.grey[600]; // Default bg
}),
);
}
}