mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-26 19:18:43 +00:00
upgrade deps
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -2,7 +2,6 @@ import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:PiliPlus/common/constants.dart';
|
||||
import 'package:PiliPlus/common/widgets/button/icon_button.dart';
|
||||
import 'package:PiliPlus/http/msg.dart';
|
||||
import 'package:PiliPlus/models/common/image_preview_type.dart';
|
||||
@@ -304,7 +303,7 @@ abstract class CommonPublishPageState<T extends CommonPublishPage>
|
||||
},
|
||||
onLongPress: onClear,
|
||||
child: ClipRRect(
|
||||
borderRadius: StyleString.mdRadius,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(4)),
|
||||
child: Image(
|
||||
height: height,
|
||||
fit: BoxFit.fitHeight,
|
||||
|
||||
@@ -91,41 +91,44 @@ class _CreateDynPanelState extends CommonPublishPageState<CreateDynPanel> {
|
||||
Widget _buildImageList(ThemeData theme) => Obx(
|
||||
() => SizedBox(
|
||||
height: 100,
|
||||
child: ListView.separated(
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
physics: const AlwaysScrollableScrollPhysics(
|
||||
parent: BouncingScrollPhysics(),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
itemCount: pathList.length == limit ? limit : pathList.length + 1,
|
||||
itemBuilder: (context, index) {
|
||||
if (pathList.length != limit && index == pathList.length) {
|
||||
return Material(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
child: InkWell(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
onTap: () => onPickImage(() {
|
||||
if (pathList.isNotEmpty && !enablePublish.value) {
|
||||
enablePublish.value = true;
|
||||
}
|
||||
}),
|
||||
child: Ink(
|
||||
width: 100,
|
||||
height: 100,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
const BorderRadius.all(Radius.circular(12)),
|
||||
color: theme.colorScheme.secondaryContainer,
|
||||
),
|
||||
child: const Center(child: Icon(Icons.add, size: 35)),
|
||||
),
|
||||
child: Row(
|
||||
spacing: 10,
|
||||
children: [
|
||||
...List.generate(
|
||||
pathList.length, (index) => buildImage(index, 100)),
|
||||
if (pathList.length != limit)
|
||||
Builder(
|
||||
builder: (context) {
|
||||
const borderRadius =
|
||||
BorderRadius.all(Radius.circular(10));
|
||||
return Material(
|
||||
borderRadius: borderRadius,
|
||||
child: InkWell(
|
||||
borderRadius: borderRadius,
|
||||
onTap: () => onPickImage(() {
|
||||
if (pathList.isNotEmpty && !enablePublish.value) {
|
||||
enablePublish.value = true;
|
||||
}
|
||||
}),
|
||||
child: Ink(
|
||||
width: 100,
|
||||
height: 100,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: borderRadius,
|
||||
color: theme.colorScheme.secondaryContainer,
|
||||
),
|
||||
child:
|
||||
const Center(child: Icon(Icons.add, size: 35)),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return buildImage(index, 100);
|
||||
}
|
||||
},
|
||||
separatorBuilder: (context, index) => const SizedBox(width: 10),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -93,15 +93,16 @@ class _ReplyPageState extends CommonPublishPageState<ReplyPage> {
|
||||
return Container(
|
||||
height: 85,
|
||||
padding: const EdgeInsets.only(bottom: 10),
|
||||
child: ListView.separated(
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
physics: const AlwaysScrollableScrollPhysics(
|
||||
parent: BouncingScrollPhysics(),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||
itemCount: pathList.length,
|
||||
itemBuilder: (context, index) => buildImage(index, 75),
|
||||
separatorBuilder: (context, index) => const SizedBox(width: 10),
|
||||
child: Row(
|
||||
spacing: 10,
|
||||
children: List.generate(
|
||||
pathList.length,
|
||||
(index) => buildImage(index, 75),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user