chore: update analytics page spacing for mobile (#3412)
This commit is contained in:
parent
48cb93af90
commit
1f64a32030
4 changed files with 43 additions and 41 deletions
|
|
@ -181,24 +181,29 @@ class AnalyticsPopupWrapperState extends State<AnalyticsPopupWrapper> {
|
|||
if (kIsWeb) const SizedBox(width: 4.0),
|
||||
],
|
||||
)
|
||||
: localConstructZoom != null
|
||||
? AppBar(
|
||||
leading: widget.backButtonOverride ??
|
||||
(localConstructZoom != null
|
||||
? IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () => setConstructZoom(null),
|
||||
)
|
||||
: const SizedBox()),
|
||||
)
|
||||
: null,
|
||||
body: localView == ConstructTypeEnum.morph
|
||||
? localConstructZoom == null
|
||||
? MorphAnalyticsListView(controller: this)
|
||||
: MorphDetailsView(constructId: localConstructZoom!)
|
||||
: localConstructZoom == null
|
||||
? VocabAnalyticsListView(controller: this)
|
||||
: VocabDetailsView(constructId: localConstructZoom!),
|
||||
: null,
|
||||
body: Stack(
|
||||
children: [
|
||||
localView == ConstructTypeEnum.morph
|
||||
? localConstructZoom == null
|
||||
? MorphAnalyticsListView(controller: this)
|
||||
: MorphDetailsView(constructId: localConstructZoom!)
|
||||
: localConstructZoom == null
|
||||
? VocabAnalyticsListView(controller: this)
|
||||
: VocabDetailsView(constructId: localConstructZoom!),
|
||||
if (localConstructZoom != null)
|
||||
Positioned(
|
||||
top: 0,
|
||||
left: 0,
|
||||
child: IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () {
|
||||
setConstructZoom(null);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:collection/collection.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/config/themes.dart';
|
||||
import 'package:fluffychat/pangea/analytics_details_popup/analytics_details_popup.dart';
|
||||
import 'package:fluffychat/pangea/analytics_misc/construct_type_enum.dart';
|
||||
import 'package:fluffychat/pangea/analytics_misc/construct_use_model.dart';
|
||||
|
|
@ -27,15 +28,18 @@ class MorphAnalyticsListView extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
padding: FluffyThemes.isColumnMode(context)
|
||||
? const EdgeInsets.all(16.0)
|
||||
: const EdgeInsets.all(0.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 16.0,
|
||||
children: [
|
||||
// Add your text widget here
|
||||
const InstructionsInlineTooltip(
|
||||
instructionsEnum: InstructionsEnum.morphAnalyticsList,
|
||||
),
|
||||
if (!InstructionsEnum.morphAnalyticsList.isToggledOff)
|
||||
const SizedBox(height: 16.0),
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
key: const PageStorageKey<String>('morph-analytics'),
|
||||
|
|
|
|||
|
|
@ -87,9 +87,6 @@ class VocabAnalyticsListView extends StatelessWidget {
|
|||
AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
curve: Curves.easeInOut,
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: controller.isSearching ? 8.0 : 24.0,
|
||||
),
|
||||
child: Container(
|
||||
height: 60,
|
||||
alignment: Alignment.center,
|
||||
|
|
@ -134,24 +131,21 @@ class VocabAnalyticsListView extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: GridView.builder(
|
||||
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||
maxCrossAxisExtent: 100.0,
|
||||
mainAxisExtent: 100.0,
|
||||
crossAxisSpacing: 8.0,
|
||||
mainAxisSpacing: 8.0,
|
||||
),
|
||||
itemCount: _filteredVocab.length,
|
||||
itemBuilder: (context, index) {
|
||||
final vocabItem = _filteredVocab[index];
|
||||
return VocabAnalyticsListTile(
|
||||
onTap: () => controller.setConstructZoom(vocabItem.id),
|
||||
constructUse: vocabItem,
|
||||
);
|
||||
},
|
||||
child: GridView.builder(
|
||||
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||
maxCrossAxisExtent: 100.0,
|
||||
mainAxisExtent: 100.0,
|
||||
crossAxisSpacing: 8.0,
|
||||
mainAxisSpacing: 8.0,
|
||||
),
|
||||
itemCount: _filteredVocab.length,
|
||||
itemBuilder: (context, index) {
|
||||
final vocabItem = _filteredVocab[index];
|
||||
return VocabAnalyticsListTile(
|
||||
onTap: () => controller.setConstructZoom(vocabItem.id),
|
||||
constructUse: vocabItem,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ class AnalyticsPageView extends StatelessWidget {
|
|||
child: Padding(
|
||||
padding: const EdgeInsetsGeometry.all(16.0),
|
||||
child: Column(
|
||||
spacing: 16.0,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
LearningProgressIndicators(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue