feat: Upgrade dio version to latest, applied migrations

This commit is contained in:
Anton Stubenbord
2023-02-13 18:13:08 +01:00
parent 26b283b83a
commit c5033792aa
17 changed files with 124 additions and 170 deletions

View File

@@ -242,13 +242,6 @@ class _DocumentsPageState extends State<DocumentsPage>
children: [
Builder(
builder: (context) {
final itemHeight =
MediaQuery.sizeOf(context).height -
MediaQuery.viewInsetsOf(context).bottom -
MediaQuery.viewInsetsOf(context).top -
kToolbarHeight -
kTextTabBarHeight -
56;
return RefreshIndicator(
edgeOffset: kToolbarHeight + kTextTabBarHeight,
onRefresh: _onReloadDocuments,
@@ -281,7 +274,6 @@ class _DocumentsPageState extends State<DocumentsPage>
return SliverAdaptiveDocumentsView(
viewType: state.viewType,
maxItemExtent: itemHeight,
onTap: _openDetails,
onSelected: context
.read<DocumentsCubit>()

View File

@@ -23,7 +23,6 @@ abstract class AdaptiveDocumentsView extends StatelessWidget {
final void Function(int? id)? onCorrespondentSelected;
final void Function(int? id)? onDocumentTypeSelected;
final void Function(int? id)? onStoragePathSelected;
final double maxItemExtent;
bool get showLoadingPlaceholder => (!hasLoaded && isLoading);
const AdaptiveDocumentsView({
@@ -42,7 +41,6 @@ abstract class AdaptiveDocumentsView extends StatelessWidget {
required this.isLoading,
required this.hasLoaded,
this.enableHeroAnimation = true,
required this.maxItemExtent,
});
}
@@ -63,7 +61,6 @@ class SliverAdaptiveDocumentsView extends AdaptiveDocumentsView {
super.enableHeroAnimation,
required super.isLoading,
required super.hasLoaded,
super.maxItemExtent = double.infinity,
});
@override
@@ -112,8 +109,7 @@ class SliverAdaptiveDocumentsView extends AdaptiveDocumentsView {
//TODO: Build detailed loading animation
return DocumentsListLoadingWidget.sliver();
}
return SliverFixedExtentList(
itemExtent: maxItemExtent,
return SliverList(
delegate: SliverChildBuilderDelegate(
childCount: documents.length,
(context, index) {
@@ -189,7 +185,6 @@ class DefaultAdaptiveDocumentsView extends AdaptiveDocumentsView {
super.selectedDocumentIds,
super.viewType,
super.enableHeroAnimation = true,
super.maxItemExtent = double.infinity,
});
@override