add scrolling to about package
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -2,9 +2,11 @@ import 'package:flutter/material.dart';
|
|||||||
|
|
||||||
class MihSingleChildScroll extends StatefulWidget {
|
class MihSingleChildScroll extends StatefulWidget {
|
||||||
final Widget child;
|
final Widget child;
|
||||||
|
final bool? scrollbarOn;
|
||||||
const MihSingleChildScroll({
|
const MihSingleChildScroll({
|
||||||
super.key,
|
super.key,
|
||||||
required this.child,
|
required this.child,
|
||||||
|
this.scrollbarOn,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -18,7 +20,8 @@ class _MihSingleChildScrollState extends State<MihSingleChildScroll> {
|
|||||||
bottom: false,
|
bottom: false,
|
||||||
minimum: EdgeInsets.only(bottom: 5),
|
minimum: EdgeInsets.only(bottom: 5),
|
||||||
child: ScrollConfiguration(
|
child: ScrollConfiguration(
|
||||||
behavior: ScrollConfiguration.of(context).copyWith(scrollbars: false),
|
behavior: ScrollConfiguration.of(context)
|
||||||
|
.copyWith(scrollbars: widget.scrollbarOn ?? false),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: widget.child,
|
child: widget.child,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -94,7 +94,6 @@ class _MihAttributesState extends State<MihAttributes> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
innerHorizontalPadding: 10,
|
|
||||||
bodyItem: getBody(),
|
bodyItem: getBody(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -108,6 +107,9 @@ class _MihAttributesState extends State<MihAttributes> {
|
|||||||
"As per the terms for free use for these third party providers, the following assets require attribution";
|
"As per the terms for free use for these third party providers, the following assets require attribution";
|
||||||
|
|
||||||
return MihSingleChildScroll(
|
return MihSingleChildScroll(
|
||||||
|
scrollbarOn: true,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
@@ -191,7 +193,8 @@ class _MihAttributesState extends State<MihAttributes> {
|
|||||||
"https://www.linkedin.com/in/tarah-meth-3b6309254/"),
|
"https://www.linkedin.com/in/tarah-meth-3b6309254/"),
|
||||||
displayIcon(MihIcons.mihLogo, "Tarah Meth",
|
displayIcon(MihIcons.mihLogo, "Tarah Meth",
|
||||||
"https://www.linkedin.com/in/tarah-meth-3b6309254/"),
|
"https://www.linkedin.com/in/tarah-meth-3b6309254/"),
|
||||||
displayIcon(MihIcons.mzansiAi, "Ollama", "https://ollama.com/"),
|
displayIcon(
|
||||||
|
MihIcons.mzansiAi, "Ollama", "https://ollama.com/"),
|
||||||
displayIcon(MihIcons.mzansiWallet, "Freepik",
|
displayIcon(MihIcons.mzansiWallet, "Freepik",
|
||||||
"https://www.flaticon.com/free-icon/wallet-passes-app_3884407?term=wallet&page=1&position=21&origin=search&related_id=3884407"),
|
"https://www.flaticon.com/free-icon/wallet-passes-app_3884407?term=wallet&page=1&position=21&origin=search&related_id=3884407"),
|
||||||
displayIcon(MihIcons.patientProfile, "RaftelDesign",
|
displayIcon(MihIcons.patientProfile, "RaftelDesign",
|
||||||
@@ -282,6 +285,7 @@ class _MihAttributesState extends State<MihAttributes> {
|
|||||||
// )
|
// )
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -777,6 +777,7 @@ class _MihInfoState extends State<MihInfo> {
|
|||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
MihSingleChildScroll(
|
MihSingleChildScroll(
|
||||||
|
scrollbarOn: true,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
aboutHeadings(),
|
aboutHeadings(),
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ class _MihPrivacyPolicyState extends State<MihPrivacyPolicy> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
innerHorizontalPadding: 10,
|
|
||||||
bodyItem: getBody(context),
|
bodyItem: getBody(context),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -55,10 +54,14 @@ class _MihPrivacyPolicyState extends State<MihPrivacyPolicy> {
|
|||||||
children
|
children
|
||||||
.addAll(PolicyAndTermsText().getPrivacyPolicyText(context, englishOn));
|
.addAll(PolicyAndTermsText().getPrivacyPolicyText(context, englishOn));
|
||||||
return MihSingleChildScroll(
|
return MihSingleChildScroll(
|
||||||
|
scrollbarOn: true,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: children,
|
children: children,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ class _MIHTermsOfServiceState extends State<MIHTermsOfService> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
innerHorizontalPadding: 10,
|
|
||||||
bodyItem: getBody(context),
|
bodyItem: getBody(context),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -55,9 +54,13 @@ class _MIHTermsOfServiceState extends State<MIHTermsOfService> {
|
|||||||
children
|
children
|
||||||
.addAll(PolicyAndTermsText().getTermsOfServiceText(context, englishOn));
|
.addAll(PolicyAndTermsText().getTermsOfServiceText(context, englishOn));
|
||||||
return MihSingleChildScroll(
|
return MihSingleChildScroll(
|
||||||
|
scrollbarOn: true,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: children,
|
children: children,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user