Merge pull request 'made better scroll for reports page' (#736) from SEND075 into main
All checks were successful
ci/woodpecker/push/frontend Pipeline was successful
All checks were successful
ci/woodpecker/push/frontend Pipeline was successful
Reviewed-on: #736
This commit was merged in pull request #736.
This commit is contained in:
@@ -641,7 +641,7 @@
|
||||
},
|
||||
"noFee": "Без оплаты",
|
||||
|
||||
"recipientWillReceive": "Получатель получит: {amount}",
|
||||
"recipientWillReceive": "Получателю поступит: {amount}",
|
||||
"@recipientWillReceive": {
|
||||
"description": "Метка, показывающая, сколько получит получатель",
|
||||
"placeholders": {
|
||||
|
||||
@@ -25,14 +25,11 @@ class OperationsCardsList extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final loc = AppLocalizations.of(context)!;
|
||||
final items = buildOperationCardItems(
|
||||
context,
|
||||
operations,
|
||||
onTap: onTap,
|
||||
);
|
||||
final items = buildOperationCardItems(context, operations, onTap: onTap);
|
||||
|
||||
if (operations.isEmpty) {
|
||||
return Expanded(
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 32),
|
||||
child: Center(
|
||||
child: Text(
|
||||
loc.reportPaymentsEmpty,
|
||||
@@ -43,31 +40,27 @@ class OperationsCardsList extends StatelessWidget {
|
||||
}
|
||||
|
||||
final extraItems = loadMoreState == LoadMoreState.hidden ? 0 : 1;
|
||||
return Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: items.length + extraItems,
|
||||
itemBuilder: (context, index) {
|
||||
if (index < items.length) {
|
||||
return items[index];
|
||||
}
|
||||
if (loadMoreState == LoadMoreState.loading) {
|
||||
return const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 16),
|
||||
child: Center(child: CircularProgressIndicator()),
|
||||
);
|
||||
}
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
child: Center(
|
||||
child: TextButton(
|
||||
onPressed: onLoadMore,
|
||||
child: Text(loc.loadMore),
|
||||
),
|
||||
),
|
||||
return ListView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemCount: items.length + extraItems,
|
||||
itemBuilder: (context, index) {
|
||||
if (index < items.length) {
|
||||
return items[index];
|
||||
}
|
||||
if (loadMoreState == LoadMoreState.loading) {
|
||||
return const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 16),
|
||||
child: Center(child: CircularProgressIndicator()),
|
||||
);
|
||||
},
|
||||
),
|
||||
}
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
child: Center(
|
||||
child: TextButton(onPressed: onLoadMore, child: Text(loc.loadMore)),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ class OperationHistoryContent extends StatelessWidget {
|
||||
final operations = controller.operations;
|
||||
final filteredOperations = controller.filteredOperations;
|
||||
|
||||
return Padding(
|
||||
return SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
|
||||
Reference in New Issue
Block a user