chore: bump line length to 120 (#20191)

This commit is contained in:
shenlong
2025-07-25 08:07:22 +05:30
committed by GitHub
parent 977c9b96ba
commit ad65e9011a
517 changed files with 4520 additions and 9514 deletions
+1 -3
View File
@@ -187,9 +187,7 @@ class _AspectRatioButton extends StatelessWidget {
'7:5' => Icons.crop_7_5_rounded,
_ => Icons.crop_free_rounded,
},
color: aspectRatio.value == ratio
? context.primaryColor
: context.themeData.iconTheme.color,
color: aspectRatio.value == ratio ? context.primaryColor : context.themeData.iconTheme.color,
),
onPressed: () {
cropController.crop = const Rect.fromLTRB(0.1, 0.1, 0.9, 0.9);
+3 -8
View File
@@ -40,9 +40,7 @@ class EditImagePage extends ConsumerWidget {
image.image.resolve(const ImageConfiguration()).addListener(
ImageStreamListener(
(ImageInfo info, bool _) {
info.image
.toByteData(format: ImageByteFormat.png)
.then((byteData) {
info.image.toByteData(format: ImageByteFormat.png).then((byteData) {
if (byteData != null) {
completer.complete(byteData.buffer.asUint8List());
} else {
@@ -50,8 +48,7 @@ class EditImagePage extends ConsumerWidget {
}
});
},
onError: (exception, stackTrace) =>
completer.completeError(exception),
onError: (exception, stackTrace) => completer.completeError(exception),
),
);
return completer.future;
@@ -103,9 +100,7 @@ class EditImagePage extends ConsumerWidget {
),
actions: <Widget>[
TextButton(
onPressed: isEdited
? () => _saveEditedImage(context, asset, image, ref)
: null,
onPressed: isEdited ? () => _saveEditedImage(context, asset, image, ref) : null,
child: Text(
"save_to_gallery".tr(),
style: TextStyle(
+5 -13
View File
@@ -34,18 +34,14 @@ class FilterImagePage extends HookWidget {
ColorFilter filter,
) {
final completer = Completer<ui.Image>();
final size =
Size(inputImage.width.toDouble(), inputImage.height.toDouble());
final size = Size(inputImage.width.toDouble(), inputImage.height.toDouble());
final recorder = ui.PictureRecorder();
final canvas = Canvas(recorder);
final paint = Paint()..colorFilter = filter;
canvas.drawImage(inputImage, Offset.zero, paint);
recorder
.endRecording()
.toImage(size.width.round(), size.height.round())
.then((image) {
recorder.endRecording().toImage(size.width.round(), size.height.round()).then((image) {
completer.complete(image);
});
@@ -67,8 +63,7 @@ class FilterImagePage extends HookWidget {
final uiImage = await completer.future;
final filteredUiImage = await createFilteredImage(uiImage, filter);
final byteData =
await filteredUiImage.toByteData(format: ui.ImageByteFormat.png);
final byteData = await filteredUiImage.toByteData(format: ui.ImageByteFormat.png);
final pngBytes = byteData!.buffer.asUint8List();
return Image.memory(pngBytes, fit: BoxFit.contain);
@@ -87,8 +82,7 @@ class FilterImagePage extends HookWidget {
size: 24,
),
onPressed: () async {
final filteredImage =
await applyFilterAndConvert(colorFilter.value);
final filteredImage = await applyFilterAndConvert(colorFilter.value);
context.pushRoute(
EditImageRoute(
asset: asset,
@@ -165,9 +159,7 @@ class _FilterButton extends StatelessWidget {
borderRadius: const BorderRadius.all(
Radius.circular(10),
),
border: isSelected
? Border.all(color: context.primaryColor, width: 3)
: null,
border: isSelected ? Border.all(color: context.primaryColor, width: 3) : null,
),
child: ClipRRect(
borderRadius: const BorderRadius.all(