From 06dde3dbba4cb3148327ed0324bba9d5844581c5 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Fri, 22 Nov 2024 17:25:07 -0300 Subject: [PATCH] clean PR --- .../lib/src/helpers/field_info.dart | 6 - packages/remix/lib/src/theme.dart | 67 ------- packages/remix/lib/src/theme.g.dart | 171 ------------------ 3 files changed, 244 deletions(-) delete mode 100644 packages/remix/lib/src/theme.dart delete mode 100644 packages/remix/lib/src/theme.g.dart diff --git a/packages/mix_generator/lib/src/helpers/field_info.dart b/packages/mix_generator/lib/src/helpers/field_info.dart index a095a1b1a..4b0827f88 100644 --- a/packages/mix_generator/lib/src/helpers/field_info.dart +++ b/packages/mix_generator/lib/src/helpers/field_info.dart @@ -319,12 +319,6 @@ class ClassBuilderContext { constructor.parameters.map(ParameterInfo.ofElement).toList(); } - // List get fields { - // // if (_fieldsCache != null) return _fieldsCache!; - - // return classElement.fields.map((e) => FieldInfo.ofElement(e)).toList(); - // } - bool get hasDiagnosticable => classElement.allSupertypes.any((e) => e.element.name == 'Diagnosticable'); diff --git a/packages/remix/lib/src/theme.dart b/packages/remix/lib/src/theme.dart deleted file mode 100644 index 66edc9872..000000000 --- a/packages/remix/lib/src/theme.dart +++ /dev/null @@ -1,67 +0,0 @@ -import 'package:flutter/widgets.dart'; -import 'package:mix/mix.dart'; -import 'package:mix_annotations/mix_annotations.dart'; - -part 'theme.g.dart'; - -@MixableToken(Color) -class ColorTokens { - final Color primary; - final Color secondary; - final Color tertiary; - - const ColorTokens({ - required this.primary, - required this.secondary, - required this.tertiary, - }); - - Map get data => _$ColorTokensToMap(this); -} - -@MixableToken(TextStyle) -class TextTokens { - final TextStyle h1; - final TextStyle h2; - final TextStyle h3; - final TextStyle body; - - const TextTokens({ - required this.h1, - required this.h2, - required this.h3, - required this.body, - }); - - Map get data => _$TextTokensToMap(this); -} - -@MixableToken(Radius) -class RadiusTokens { - final Radius small; - final Radius medium; - final Radius large; - - const RadiusTokens({ - required this.small, - required this.medium, - required this.large, - }); - - Map get data => _$RadiusTokensToMap(this); -} - -@MixableToken(double) -class SpaceTokens { - final double p8; - final double p16; - final double p24; - - const SpaceTokens({ - required this.p8, - required this.p16, - required this.p24, - }); - - Map get data => _$SpaceTokensToMap(this); -} diff --git a/packages/remix/lib/src/theme.g.dart b/packages/remix/lib/src/theme.g.dart deleted file mode 100644 index a39534928..000000000 --- a/packages/remix/lib/src/theme.g.dart +++ /dev/null @@ -1,171 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'theme.dart'; - -// ************************************************************************** -// MixableTokensGenerator -// ************************************************************************** - -class _$ColorTokensStruct { - _$ColorTokensStruct(); - - final ColorToken primary = const ColorToken('primary'); - final ColorToken secondary = const ColorToken('secondary'); - final ColorToken tertiary = const ColorToken('tertiary'); -} - -final _structColorTokens = _$ColorTokensStruct(); - -Map _$ColorTokensToMap(ColorTokens tokens) { - return { - _structColorTokens.primary: tokens.primary, - _structColorTokens.secondary: tokens.secondary, - _structColorTokens.tertiary: tokens.tertiary, - }; -} - -extension $ColorTokensColorUtilityX on ColorUtility { - T $primary() => ref(_structColorTokens.primary); - T $secondary() => ref(_structColorTokens.secondary); - T $tertiary() => ref(_structColorTokens.tertiary); -} - -class BuildContextColorTokensMethods { - const BuildContextColorTokensMethods(this.context); - - final BuildContext context; - Color primary() => _structColorTokens.primary.resolve(context); - Color secondary() => _structColorTokens.secondary.resolve(context); - Color tertiary() => _structColorTokens.tertiary.resolve(context); -} - -extension $BuildContextColorTokensX on BuildContext { - BuildContextColorTokensMethods get $color => - BuildContextColorTokensMethods(this); -} - -class _$TextTokensStruct { - _$TextTokensStruct(); - - final TextStyleToken h1 = const TextStyleToken('h1'); - final TextStyleToken h2 = const TextStyleToken('h2'); - final TextStyleToken h3 = const TextStyleToken('h3'); - final TextStyleToken body = const TextStyleToken('body'); -} - -final _structTextTokens = _$TextTokensStruct(); - -Map _$TextTokensToMap(TextTokens tokens) { - return { - _structTextTokens.h1: tokens.h1, - _structTextTokens.h2: tokens.h2, - _structTextTokens.h3: tokens.h3, - _structTextTokens.body: tokens.body, - }; -} - -extension $TextTokensTextStyleUtilityX - on TextStyleUtility { - T $h1() => ref(_structTextTokens.h1); - T $h2() => ref(_structTextTokens.h2); - T $h3() => ref(_structTextTokens.h3); - T $body() => ref(_structTextTokens.body); -} - -class BuildContextTextTokensMethods { - const BuildContextTextTokensMethods(this.context); - - final BuildContext context; - TextStyle h1() => _structTextTokens.h1.resolve(context); - TextStyle h2() => _structTextTokens.h2.resolve(context); - TextStyle h3() => _structTextTokens.h3.resolve(context); - TextStyle body() => _structTextTokens.body.resolve(context); -} - -extension $BuildContextTextTokensX on BuildContext { - BuildContextTextTokensMethods get $textStyle => - BuildContextTextTokensMethods(this); -} - -class _$RadiusTokensStruct { - _$RadiusTokensStruct(); - - final RadiusToken small = const RadiusToken('small'); - final RadiusToken medium = const RadiusToken('medium'); - final RadiusToken large = const RadiusToken('large'); -} - -final _structRadiusTokens = _$RadiusTokensStruct(); - -Map _$RadiusTokensToMap(RadiusTokens tokens) { - return { - _structRadiusTokens.small: tokens.small, - _structRadiusTokens.medium: tokens.medium, - _structRadiusTokens.large: tokens.large, - }; -} - -extension $RadiusTokensRadiusUtilityX on RadiusUtility { - T $small() => ref(_structRadiusTokens.small); - T $medium() => ref(_structRadiusTokens.medium); - T $large() => ref(_structRadiusTokens.large); -} - -class BuildContextRadiusTokensMethods { - const BuildContextRadiusTokensMethods(this.context); - - final BuildContext context; - Radius small() => _structRadiusTokens.small.resolve(context); - Radius medium() => _structRadiusTokens.medium.resolve(context); - Radius large() => _structRadiusTokens.large.resolve(context); -} - -extension $BuildContextRadiusTokensX on BuildContext { - BuildContextRadiusTokensMethods get $radius => - BuildContextRadiusTokensMethods(this); -} - -class _$SpaceTokensStruct { - _$SpaceTokensStruct(); - - final SpaceToken p8 = const SpaceToken('p8'); - final SpaceToken p16 = const SpaceToken('p16'); - final SpaceToken p24 = const SpaceToken('p24'); -} - -final _structSpaceTokens = _$SpaceTokensStruct(); - -Map _$SpaceTokensToMap(SpaceTokens tokens) { - return { - _structSpaceTokens.p8: tokens.p8, - _structSpaceTokens.p16: tokens.p16, - _structSpaceTokens.p24: tokens.p24, - }; -} - -extension $SpaceTokensSpacingSideUtilityX - on SpacingSideUtility { - T $p8() => ref(_structSpaceTokens.p8); - T $p16() => ref(_structSpaceTokens.p16); - T $p24() => ref(_structSpaceTokens.p24); -} - -extension $SpaceTokensGapUtilityX on GapUtility { - T $p8() => ref(_structSpaceTokens.p8); - T $p16() => ref(_structSpaceTokens.p16); - T $p24() => ref(_structSpaceTokens.p24); -} - -class BuildContextSpaceTokensMethods { - const BuildContextSpaceTokensMethods(this.context); - - final BuildContext context; - double p8() => _structSpaceTokens.p8.resolve(context); - double p16() => _structSpaceTokens.p16.resolve(context); - double p24() => _structSpaceTokens.p24.resolve(context); -} - -extension $BuildContextSpaceTokensX on BuildContext { - BuildContextSpaceTokensMethods get $space => - BuildContextSpaceTokensMethods(this); -}