Skip to content

Commit

Permalink
feat: example uses system theme mode by default
Browse files Browse the repository at this point in the history
  • Loading branch information
clragon committed Jan 27, 2024
1 parent 0ab21f4 commit f7ecd3e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion example/lib/options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';

abstract class FieldOption<T> extends ValueNotifier<T> {
FieldOption({
Expand Down Expand Up @@ -104,7 +105,8 @@ class FieldSettings extends ChangeNotifier {
final ToggleFieldOption darkMode = ToggleFieldOption(
key: 'darkMode',
title: 'Dark Mode',
value: false,
value: SchedulerBinding.instance.platformDispatcher.platformBrightness ==
Brightness.dark,
icon: Icons.dark_mode,
iconFalse: Icons.light_mode,
);
Expand Down

0 comments on commit f7ecd3e

Please sign in to comment.