mirror of
https://github.com/flutter/samples.git
synced 2025-11-10 23:08:59 +00:00
[Gallery] Fix directory structure (#312)
This commit is contained in:
57
gallery/lib/themes/material_demo_theme_data.dart
Normal file
57
gallery/lib/themes/material_demo_theme_data.dart
Normal file
@@ -0,0 +1,57 @@
|
||||
// Copyright 2019 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/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class MaterialDemoThemeData {
|
||||
static final themeData = ThemeData(
|
||||
colorScheme: _colorScheme,
|
||||
appBarTheme: AppBarTheme(
|
||||
color: _colorScheme.primary,
|
||||
iconTheme: IconThemeData(color: _colorScheme.onPrimary),
|
||||
),
|
||||
bottomAppBarTheme: BottomAppBarTheme(
|
||||
color: _colorScheme.primary,
|
||||
),
|
||||
buttonTheme: ButtonThemeData(
|
||||
textTheme: ButtonTextTheme.primary,
|
||||
colorScheme: _colorScheme,
|
||||
),
|
||||
canvasColor: _colorScheme.background,
|
||||
cursorColor: _colorScheme.primary,
|
||||
toggleableActiveColor: _colorScheme.primary,
|
||||
highlightColor: Colors.transparent,
|
||||
indicatorColor: _colorScheme.onPrimary,
|
||||
primaryColor: _colorScheme.primary,
|
||||
accentColor: _colorScheme.primary,
|
||||
backgroundColor: Colors.white,
|
||||
scaffoldBackgroundColor: _colorScheme.background,
|
||||
snackBarTheme: SnackBarThemeData(
|
||||
behavior: SnackBarBehavior.floating,
|
||||
),
|
||||
typography: Typography(
|
||||
platform: defaultTargetPlatform,
|
||||
englishLike: Typography.englishLike2018,
|
||||
dense: Typography.dense2018,
|
||||
tall: Typography.tall2018,
|
||||
),
|
||||
);
|
||||
|
||||
static const _colorScheme = ColorScheme(
|
||||
primary: Color(0xFF6200EE),
|
||||
primaryVariant: Color(0xFF6200EE),
|
||||
secondary: Color(0xFFFF5722),
|
||||
secondaryVariant: Color(0xFFFF5722),
|
||||
background: Colors.white,
|
||||
surface: Color(0xFFF2F2F2),
|
||||
onBackground: Colors.black,
|
||||
onSurface: Colors.black,
|
||||
error: Colors.red,
|
||||
onError: Colors.white,
|
||||
onPrimary: Colors.white,
|
||||
onSecondary: Colors.white,
|
||||
brightness: Brightness.light,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user