This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2024 Fredrick Allan Grott. 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 'package:flutter/services.dart'; | |
import 'package:universal_platform/universal_platform.dart'; | |
/// An example of how to do themed platform adaptations in which you do not | |
/// have to wait for the flutter SDK team to get them via the ThemeData |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@override | |
Widget build(BuildContext context) { | |
switch (widget._checkboxType) { | |
case _CheckboxType.material: | |
break; | |
case _CheckboxType.adaptive: | |
final ThemeData theme = Theme.of(context); | |
switch (theme.platform) { | |
case TargetPlatform.android: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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'; | |
//TODO: Re-do when contrastLevel of ColorScheme lands in beta | |
ColorScheme colorSchemeDark(Color seedColor) { | |
return ColorScheme.fromSeed( | |
brightness: Brightness.dark, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2024 Fredrick Allan Grott. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
// ignore_for_file: avoid_redundant_argument_values | |
import 'package:flutter/material.dart'; | |
//TODO: Re-do when contrastLevel of ColorScheme lands in beta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2024 Fredrick Allan Grott. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
// best practice wise we always do color seeds | |
// and brand colors in light mode. | |
import 'package:flutter/material.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; | |
import 'package:flutter_localizations/flutter_localizations.dart'; | |
import 'package:sdk_cs_googlefonts/src/sample_feature/sample_item_details_view.dart'; | |
import 'package:sdk_cs_googlefonts/src/sample_feature/sample_item_list_view.dart'; | |
import 'package:sdk_cs_googlefonts/src/settings/settings_controller.dart'; | |
import 'package:sdk_cs_googlefonts/src/settings/settings_view.dart'; | |
import 'package:sdk_cs_googlefonts/src/themes/color_scheme_dark.dart'; | |
import 'package:sdk_cs_googlefonts/src/themes/color_scheme_light.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2024 Fredrick Allan Grott. 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 'package:material_color_utilities/material_color_utilities.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@override | |
Widget build(BuildContext context) { | |
// Wrap MaterialApp with a DynamicColorBuilder. | |
return DynamicColorBuilder( | |
builder: (ColorScheme? lightDynamic, ColorScheme? darkDynamic) { | |
ColorScheme lightColorScheme; | |
ColorScheme darkColorScheme; | |
if (lightDynamic != null && darkDynamic != null) { | |
// On Android S+ devices, use the provided dynamic color scheme. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2024 Fredrick Allan Grott. 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 'package:google_fonts/google_fonts.dart'; | |
//TODO: When fixes to variable fonts lands redo | |
// to add wght, opsz, ital, and grad and note | |
// grad has to be set differently for dark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2024 Fredrick Allan Grott. 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 'package:google_fonts/google_fonts.dart'; | |
//TODO: When fixes to variable fonts lands redo | |
// to add wght, opsz, ital, and grad and note | |
// grad has to be set differently for dark |
NewerOlder