mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
formatted all files.
This commit is contained in:
@ -1,9 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_html/flutter_html.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:syncrow_web/pages/auth/bloc/auth_bloc.dart';
|
||||
import 'package:syncrow_web/pages/common/bloc/project_manager.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/constants/routes_const.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
@ -89,7 +87,7 @@ class _AgreementAndPrivacyDialogState extends State<AgreementAndPrivacyDialog> {
|
||||
controller: _scrollController,
|
||||
padding: const EdgeInsets.all(25),
|
||||
child: Html(
|
||||
data: "$_dialogContent $staticText",
|
||||
data: '$_dialogContent $staticText',
|
||||
onLinkTap: (url, attributes, element) async {
|
||||
if (url != null) {
|
||||
final uri = Uri.parse(url);
|
||||
@ -97,10 +95,10 @@ class _AgreementAndPrivacyDialogState extends State<AgreementAndPrivacyDialog> {
|
||||
}
|
||||
},
|
||||
style: {
|
||||
"body": Style(
|
||||
'body': Style(
|
||||
fontSize: FontSize(14),
|
||||
color: Colors.black87,
|
||||
lineHeight: LineHeight(1.5),
|
||||
lineHeight: const LineHeight(1.5),
|
||||
),
|
||||
},
|
||||
),
|
||||
@ -110,7 +108,7 @@ class _AgreementAndPrivacyDialogState extends State<AgreementAndPrivacyDialog> {
|
||||
}
|
||||
|
||||
Widget _buildActionButton() {
|
||||
final String buttonText = _currentPage == 2 ? "I Agree" : "Next";
|
||||
final buttonText = _currentPage == 2 ? 'I Agree' : 'Next';
|
||||
|
||||
return InkWell(
|
||||
onTap: _isAtEnd
|
||||
@ -167,7 +165,7 @@ class _AgreementAndPrivacyDialogState extends State<AgreementAndPrivacyDialog> {
|
||||
AuthBloc.logout(context);
|
||||
context.go(RoutesConst.auth);
|
||||
},
|
||||
child: const Text("Cancel"),
|
||||
child: const Text('Cancel'),
|
||||
),
|
||||
_buildActionButton(),
|
||||
],
|
||||
|
@ -11,7 +11,7 @@ class HomePage extends StatelessWidget with HelperResponsiveLayout {
|
||||
final isSmallScreen = isSmallScreenSize(context);
|
||||
final isMediumScreen = isMediumScreenSize(context);
|
||||
return isSmallScreen || isMediumScreen
|
||||
? HomeMobilePage()
|
||||
? const HomeMobilePage()
|
||||
: const HomeWebPage();
|
||||
}
|
||||
}
|
||||
|
@ -4,16 +4,15 @@ import 'package:flutter_svg/svg.dart';
|
||||
import 'package:syncrow_web/pages/home/bloc/home_bloc.dart';
|
||||
import 'package:syncrow_web/pages/home/bloc/home_state.dart';
|
||||
import 'package:syncrow_web/pages/home/view/home_card.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||
import 'package:syncrow_web/web_layout/web_scaffold.dart';
|
||||
|
||||
class HomeMobilePage extends StatelessWidget {
|
||||
HomeMobilePage({super.key});
|
||||
const HomeMobilePage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Size size = MediaQuery.of(context).size;
|
||||
final size = MediaQuery.of(context).size;
|
||||
return PopScope(
|
||||
canPop: false,
|
||||
onPopInvoked: (didPop) => false,
|
||||
@ -41,7 +40,8 @@ class HomeMobilePage extends StatelessWidget {
|
||||
SizedBox(height: size.height * 0.05),
|
||||
const Text(
|
||||
'ACCESS YOUR APPS',
|
||||
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w700),
|
||||
style:
|
||||
TextStyle(fontSize: 20, fontWeight: FontWeight.w700),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
Expanded(
|
||||
@ -63,8 +63,8 @@ class HomeMobilePage extends StatelessWidget {
|
||||
index: index,
|
||||
active: true,
|
||||
color: homeBloc.homeItems[index].color,
|
||||
name: homeBloc.homeItems[index].title!,
|
||||
img: homeBloc.homeItems[index].icon!,
|
||||
name: homeBloc.homeItems[index].title!,
|
||||
img: homeBloc.homeItems[index].icon!,
|
||||
onTap: () =>
|
||||
homeBloc.homeItems[index].onPress(context),
|
||||
);
|
||||
|
@ -20,11 +20,9 @@ class _HomeWebPageState extends State<HomeWebPage> {
|
||||
// Flag to track whether the dialog is already shown.
|
||||
bool _dialogShown = false;
|
||||
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Size size = MediaQuery.of(context).size;
|
||||
final size = MediaQuery.of(context).size;
|
||||
final homeBloc = BlocProvider.of<HomeBloc>(context);
|
||||
|
||||
return PopScope(
|
||||
|
@ -144,7 +144,7 @@
|
||||
// borderRadius: BorderRadius.circular(10.0),
|
||||
// boxShadow: [
|
||||
// BoxShadow(
|
||||
// color: Colors.grey.withOpacity(0.5),
|
||||
// color: Colors.grey.withValues(alpha:0.5),
|
||||
// spreadRadius: 2,
|
||||
// blurRadius: 5,
|
||||
// offset: Offset(0, 3), // changes position of shadow
|
||||
|
Reference in New Issue
Block a user