Skip to content

Commit

Permalink
fix(#64): Resolve falha Scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
Yasm1nNasc1mento committed Jan 18, 2025
1 parent 6a9e13b commit 010fbbd
Showing 1 changed file with 3 additions and 29 deletions.
32 changes: 3 additions & 29 deletions lib/ui/journey/view/journey_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class JourneyScreen extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: _buildAppBar(context),
body: _buildPage(context),
body: _buildJourney(context),
);
}

Expand Down Expand Up @@ -53,34 +53,11 @@ class JourneyScreen extends StatelessWidget {
);
}

Widget _buildPage(BuildContext context) {
return SingleChildScrollView(
child: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
_buildJourney(context),
const SizedBox(height: 80),
],
),
),
);
}

Future<void> _onRefresh() async {
final journeyViewModel = JourneyViewModel();
await journeyViewModel.journey();
await Future.delayed(const Duration(seconds: 2));
}

Widget _buildJourney(BuildContext context) {
JourneyViewModel viewModel = Provider.of<JourneyViewModel>(context);

return Card(
child: Column(
children: [
RefreshIndicator(
onRefresh: viewModel.journeyCommand.execute,
return RefreshIndicator(
onRefresh: viewModel.journeyCommand.execute,
child: ListenableBuilder(
listenable: viewModel.journeyCommand,
builder: (context, child) {
Expand Down Expand Up @@ -117,9 +94,6 @@ class JourneyScreen extends StatelessWidget {
}
},
),
),
],
),
);
}
}

0 comments on commit 010fbbd

Please sign in to comment.