Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
victoreronmosele committed Feb 11, 2024
1 parent a3309ba commit f88feae
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 15 deletions.
1 change: 0 additions & 1 deletion lib/data/app_typedefs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ typedef ColorAndStop = ({
/// [stops] to a [Gradient] from Flutter's painting library.
typedef FlutterGradientConverter = Gradient Function(
{required List<Color> colors, List<double>? stops});

1 change: 0 additions & 1 deletion lib/ui/screens/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class HomeScreenState extends State<HomeScreen> {
// ignore: unused_local_variable
final displayPortrait = appDimensions.shouldDisplayPortraitUI;


final generatorScreenWidth = appDimensions.generatorScreenWidth;
final previewSectionWidth = appDimensions.previewSectionWidth;

Expand Down
1 change: 1 addition & 0 deletions lib/ui/screens/sections/generator_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class GeneratorSection extends StatelessWidget {
// Using 6 instead of 16 to match the design due to additional space
// added by the plus button in the `ColorAndStopSelectionWidget`
const SizedBox(height: 6),

///TODO: Improve scrolling experience and performance by showing
/// `ColorAndStop` widgets on demand
const ColorAndStopSelectionWidget(),
Expand Down
1 change: 0 additions & 1 deletion lib/ui/screens/sections/left_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ class _BuiltByVictorEronmoseleState extends State<BuiltByVictorEronmosele> {

_tapGestureRecognizer = TapGestureRecognizer()
..onTap = () {

final analytics = context.read<Analytics>();

analytics.logVictorEronmoseleClickEvent();
Expand Down
6 changes: 3 additions & 3 deletions lib/ui/widgets/header/widgets/banner_ad.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ class BannerAd extends StatelessWidget {

final analytics = context.read<Analytics>();

/// TODO: Remove this when the banner ad is dynamic
///
/// This is only left for now since the banner ad is
/// TODO: Remove this when the banner ad is dynamic
///
/// This is only left for now since the banner ad is
/// for giving feedback.
analytics.logFeedbackButtonClickEvent();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class _StopTextBoxState extends State<StopTextBox> {
Widget build(BuildContext context) {
return OutlinedTextField(
inputFormatters: inputFormatters,
onSubmitted: (_){},
onSubmitted: (_) {},
onTap: () {
onTextFieldTap();
},
Expand Down
12 changes: 6 additions & 6 deletions lib/ui/widgets/selection_widgets/direction_selection_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class DirectionSelectionWidget extends StatelessWidget {
final iconSetIndex =
iconSetList.indexOf(gradientDirectionToIconSetMap);
const firstIconSetIndex = 0;

return Column(
children: [
if (iconSetIndex != firstIconSetIndex)
Expand All @@ -76,21 +76,21 @@ class DirectionSelectionWidget extends StatelessWidget {
gradientDirectionToIconSetMap.values.toList().indexOf(icon);
final gradientDirection =
gradientDirectionToIconSetMap.keys.elementAt(iconIndex);

const firstIconIndex = 0;

final gradientStyleIsLinear =
gradientStyle == GradientStyle.linear;

final thisIsTheMiddleCenterDirectionButton = iconSetIndex ==
centerGradientDirectionIndexInIconSetList &&
iconIndex ==
centerGradientDirectionIndexWithinCenterDirectionSet;

/// Circle radial button is not shown for linear gradients
final showDirection = !(gradientStyleIsLinear &&
thisIsTheMiddleCenterDirectionButton);

return Row(
children: [
if (iconIndex != firstIconIndex)
Expand Down
2 changes: 1 addition & 1 deletion tool/lib/tool.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:file/file.dart';
/// Generates the gradient samples used in the app from the gradients.json file.
///
/// Throws an [Exception] if the gradients.json file is not found.
///
///
/// [onGenerationComplete] is called when the generation is complete.
void generateGradientSamples({
required String gradientsJsonPath,
Expand Down
1 change: 0 additions & 1 deletion tool/test/tool_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ _GradientSample(name: 'Sample Gradient 2', colors: [Color(0xFFFF0000), Color(0xF

test('should throw an exception if the gradients.json file is not found',
() {

expect(
() => generateGradientSamples(
gradientsJsonPath: gradientsJsonPath,
Expand Down

0 comments on commit f88feae

Please sign in to comment.