Ui improvements for tablet mode
This commit is contained in:
@@ -7,6 +7,7 @@ import 'package:linkdy/screens/onboarding/ui/server_required.dart';
|
||||
import 'package:linkdy/screens/onboarding/ui/welcome.dart';
|
||||
import 'package:linkdy/widgets/system_overlay_style.dart';
|
||||
|
||||
import 'package:linkdy/config/sizes.dart';
|
||||
import 'package:linkdy/constants/global_keys.dart';
|
||||
|
||||
class Onboarding extends ConsumerWidget {
|
||||
@@ -19,14 +20,41 @@ class Onboarding extends ConsumerWidget {
|
||||
key: ScaffoldMessengerKeys.onboarding,
|
||||
child: Scaffold(
|
||||
body: SafeArea(
|
||||
child: PageView(
|
||||
controller: ref.watch(onboardingProvider).pageController,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
children: const [
|
||||
OnboardingWelcome(),
|
||||
OnboardingServerRequired(),
|
||||
OnboardingConnect(),
|
||||
],
|
||||
child: LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
return Center(
|
||||
child: ConstrainedBox(
|
||||
constraints: constraints.maxWidth > Sizes.tabletBreakpoint
|
||||
? const BoxConstraints(maxWidth: 500, maxHeight: 600)
|
||||
: const BoxConstraints.expand(),
|
||||
child: Container(
|
||||
decoration: constraints.maxWidth > Sizes.tabletBreakpoint
|
||||
? BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
borderRadius: BorderRadius.circular(28),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.5),
|
||||
spreadRadius: 5,
|
||||
blurRadius: 7,
|
||||
offset: const Offset(0, 3), // changes position of shadow
|
||||
),
|
||||
],
|
||||
)
|
||||
: null,
|
||||
child: PageView(
|
||||
controller: ref.watch(onboardingProvider).pageController,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
children: const [
|
||||
OnboardingWelcome(),
|
||||
OnboardingServerRequired(),
|
||||
OnboardingConnect(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user