fixed weird warnings
This commit is contained in:
@@ -62,11 +62,10 @@ class App extends StatelessWidget {
|
||||
final DatabaseProvider database;
|
||||
|
||||
const App(
|
||||
{Key? key,
|
||||
{super.key,
|
||||
required this.database,
|
||||
required this.settings,
|
||||
required this.user})
|
||||
: super(key: key);
|
||||
required this.user});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -17,7 +17,7 @@ import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||
void main() async {
|
||||
// Initalize
|
||||
WidgetsBinding binding = WidgetsFlutterBinding.ensureInitialized();
|
||||
binding.renderView.automaticSystemUiAdjustment = false;
|
||||
binding.renderViews.first.automaticSystemUiAdjustment = false;
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
// Startup
|
||||
Startup startup = Startup();
|
||||
|
||||
@@ -87,13 +87,13 @@ Widget _defaultItemBuilder(Color color, bool isCurrentColor, void Function() cha
|
||||
// The blocky color picker you can alter the layout and shape.
|
||||
class BlockPicker extends StatefulWidget {
|
||||
BlockPicker({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.pickerColor,
|
||||
required this.onColorChanged,
|
||||
this.useInShowDialog = true,
|
||||
this.layoutBuilder = _defaultLayoutBuilder,
|
||||
this.itemBuilder = _defaultItemBuilder,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final Color? pickerColor;
|
||||
final ValueChanged<Color> onColorChanged;
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
///
|
||||
/// You can create your own layout by importing `picker.dart`.
|
||||
|
||||
// ignore_for_file: use_build_context_synchronously
|
||||
|
||||
library hsv_picker;
|
||||
|
||||
import 'package:filcnaplo/models/shared_theme.dart';
|
||||
@@ -24,7 +26,7 @@ import 'package:provider/provider.dart';
|
||||
|
||||
class FilcColorPicker extends StatefulWidget {
|
||||
const FilcColorPicker({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.colorMode,
|
||||
required this.pickerColor,
|
||||
required this.onColorChanged,
|
||||
@@ -53,7 +55,7 @@ class FilcColorPicker extends StatefulWidget {
|
||||
this.colorHistory,
|
||||
this.onHistoryChanged,
|
||||
required this.onThemeIdProvided,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final CustomColorMode colorMode;
|
||||
final Color pickerColor;
|
||||
@@ -78,10 +80,10 @@ class FilcColorPicker extends StatefulWidget {
|
||||
final void Function(SharedTheme theme) onThemeIdProvided;
|
||||
|
||||
@override
|
||||
_FilcColorPickerState createState() => _FilcColorPickerState();
|
||||
FilcColorPickerState createState() => FilcColorPickerState();
|
||||
}
|
||||
|
||||
class _FilcColorPickerState extends State<FilcColorPicker> {
|
||||
class FilcColorPickerState extends State<FilcColorPicker> {
|
||||
final idController = TextEditingController();
|
||||
|
||||
late final ShareProvider shareProvider;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// FROM: https://pub.dev/packages/flutter_colorpicker
|
||||
// FROM: https://pub.dev/packages/flutter_colorpicker
|
||||
|
||||
// ignore: dangling_library_doc_comments
|
||||
/// The components of HSV Color Picker
|
||||
///
|
||||
/// Try to create a Color Picker with other layout on your own :)
|
||||
@@ -317,11 +318,11 @@ class ColorPickerInput extends StatefulWidget {
|
||||
const ColorPickerInput(
|
||||
this.color,
|
||||
this.onColorChanged, {
|
||||
Key? key,
|
||||
super.key,
|
||||
this.enableAlpha = true,
|
||||
this.embeddedText = false,
|
||||
this.disable = false,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final Color color;
|
||||
final ValueChanged<Color> onColorChanged;
|
||||
@@ -330,10 +331,10 @@ class ColorPickerInput extends StatefulWidget {
|
||||
final bool disable;
|
||||
|
||||
@override
|
||||
_ColorPickerInputState createState() => _ColorPickerInputState();
|
||||
ColorPickerInputState createState() => ColorPickerInputState();
|
||||
}
|
||||
|
||||
class _ColorPickerInputState extends State<ColorPickerInput> {
|
||||
class ColorPickerInputState extends State<ColorPickerInput> {
|
||||
TextEditingController textEditingController = TextEditingController();
|
||||
int inputColor = 0;
|
||||
|
||||
@@ -346,11 +347,7 @@ class _ColorPickerInputState extends State<ColorPickerInput> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (inputColor != widget.color.value) {
|
||||
textEditingController.text = '#' +
|
||||
widget.color.red.toRadixString(16).toUpperCase().padLeft(2, '0') +
|
||||
widget.color.green.toRadixString(16).toUpperCase().padLeft(2, '0') +
|
||||
widget.color.blue.toRadixString(16).toUpperCase().padLeft(2, '0') +
|
||||
(widget.enableAlpha ? widget.color.alpha.toRadixString(16).toUpperCase().padLeft(2, '0') : '');
|
||||
textEditingController.text = '#${widget.color.red.toRadixString(16).toUpperCase().padLeft(2, '0')}${widget.color.green.toRadixString(16).toUpperCase().padLeft(2, '0')}${widget.color.blue.toRadixString(16).toUpperCase().padLeft(2, '0')}${widget.enableAlpha ? widget.color.alpha.toRadixString(16).toUpperCase().padLeft(2, '0') : ''}';
|
||||
}
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: 6.0, left: 12.0, right: 12.0),
|
||||
@@ -516,10 +513,10 @@ class ColorPickerSlider extends StatelessWidget {
|
||||
this.onColorChanged,
|
||||
this.onColorChangeEnd,
|
||||
this.onProblem, {
|
||||
Key? key,
|
||||
super.key,
|
||||
this.displayThumbColor = false,
|
||||
this.fullThumbColor = false,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final TrackType trackType;
|
||||
final HSVColor hsvColor;
|
||||
@@ -657,13 +654,13 @@ class ColorPickerSlider extends StatelessWidget {
|
||||
class ColorIndicator extends StatelessWidget {
|
||||
const ColorIndicator(
|
||||
this.hsvColor, {
|
||||
Key? key,
|
||||
super.key,
|
||||
this.currentHsvColor,
|
||||
this.icon,
|
||||
this.width = 50.0,
|
||||
this.height = 50.0,
|
||||
this.adaptive = false,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final HSVColor hsvColor;
|
||||
final HSVColor? currentHsvColor;
|
||||
@@ -711,8 +708,8 @@ class ColorPickerArea extends StatelessWidget {
|
||||
this.onColorChanged,
|
||||
this.onChangeEnd,
|
||||
this.paletteType, {
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
super.key,
|
||||
});
|
||||
|
||||
final HSVColor hsvColor;
|
||||
final ValueChanged<HSVColor> onColorChanged;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// FROM: https://pub.dev/packages/flutter_colorpicker
|
||||
// FROM: https://pub.dev/packages/flutter_colorpicker
|
||||
|
||||
// ignore: dangling_library_doc_comments
|
||||
/// Common function lib
|
||||
|
||||
import 'dart:math';
|
||||
|
||||
@@ -12,12 +12,12 @@ import 'package:provider/provider.dart';
|
||||
class GradeTile extends StatelessWidget {
|
||||
const GradeTile(
|
||||
this.grade, {
|
||||
Key? key,
|
||||
super.key,
|
||||
this.onTap,
|
||||
this.padding,
|
||||
this.censored = false,
|
||||
this.viewOverride = false,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final Grade grade;
|
||||
final void Function()? onTap;
|
||||
@@ -194,7 +194,7 @@ class GradeTile extends StatelessWidget {
|
||||
class GradeValueWidget extends StatelessWidget {
|
||||
const GradeValueWidget(
|
||||
this.value, {
|
||||
Key? key,
|
||||
super.key,
|
||||
this.size = 38.0,
|
||||
this.fill = false,
|
||||
this.contrast = false,
|
||||
@@ -203,7 +203,7 @@ class GradeValueWidget extends StatelessWidget {
|
||||
this.complemented = false,
|
||||
this.nocolor = false,
|
||||
this.color,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final GradeValue value;
|
||||
final double size;
|
||||
|
||||
@@ -16,8 +16,7 @@ import 'package:provider/provider.dart';
|
||||
import 'lesson_tile.i18n.dart';
|
||||
|
||||
class LessonTile extends StatelessWidget {
|
||||
const LessonTile(this.lesson, {Key? key, this.onTap, this.swapDesc = false})
|
||||
: super(key: key);
|
||||
const LessonTile(this.lesson, {super.key, this.onTap, this.swapDesc = false});
|
||||
|
||||
final Lesson lesson;
|
||||
final bool swapDesc;
|
||||
@@ -287,8 +286,7 @@ enum LessonSubtileType { homework, exam, absence }
|
||||
|
||||
class LessonSubtile extends StatelessWidget {
|
||||
const LessonSubtile(
|
||||
{Key? key, this.onPressed, required this.title, required this.type})
|
||||
: super(key: key);
|
||||
{super.key, this.onPressed, required this.title, required this.type});
|
||||
|
||||
final Function()? onPressed;
|
||||
final String title;
|
||||
|
||||
@@ -11,12 +11,12 @@ import 'package:provider/provider.dart';
|
||||
class MessageTile extends StatelessWidget {
|
||||
const MessageTile(
|
||||
this.message, {
|
||||
Key? key,
|
||||
super.key,
|
||||
this.messages,
|
||||
this.padding,
|
||||
this.onTap,
|
||||
this.censored = false,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final Message message;
|
||||
final List<Message>? messages;
|
||||
|
||||
Reference in New Issue
Block a user