add fancy and cool blue
This commit is contained in:
parent
b281ffc061
commit
2fe67e7964
|
@ -1,3 +1,5 @@
|
|||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:localization/localization.dart';
|
||||
import 'package:loris/business_logic/network_tools/get_post_from_url.dart';
|
||||
|
@ -112,7 +114,10 @@ class _FullPostViewState extends State<FullPostView> {
|
|||
),
|
||||
);
|
||||
});
|
||||
return SimpleDialog(
|
||||
return BackdropFilter(
|
||||
filter:
|
||||
ImageFilter.blur(sigmaX: 10, sigmaY: 10, tileMode: TileMode.mirror),
|
||||
child: SimpleDialog(
|
||||
contentPadding: const EdgeInsets.fromLTRB(0, 24, 0, 0),
|
||||
children: [
|
||||
global.settings!.identities.length > idsChecked
|
||||
|
@ -144,6 +149,7 @@ class _FullPostViewState extends State<FullPostView> {
|
|||
setState(() {
|
||||
Navigator.of(context).pop();
|
||||
showDialog(
|
||||
barrierColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) => FullPostView(
|
||||
originPostModel: identities[value]!,
|
||||
|
@ -161,6 +167,7 @@ class _FullPostViewState extends State<FullPostView> {
|
|||
setState(() {
|
||||
Navigator.of(context).pop();
|
||||
showDialog(
|
||||
barrierColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) => FullPostView(
|
||||
originPostModel: widget.originPostModel,
|
||||
|
@ -203,6 +210,7 @@ class _FullPostViewState extends State<FullPostView> {
|
|||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -254,8 +262,11 @@ class SingleFullPostDisplay extends StatelessWidget {
|
|||
));
|
||||
c.addAll(descendantsWidgets);
|
||||
return Container(
|
||||
padding:
|
||||
EdgeInsets.fromLTRB(level == 0 ? 0 : 4, 0, level == 0 ? 0 : 4, 0),
|
||||
padding: EdgeInsets.fromLTRB(
|
||||
level == 0 ? 0 : 4,
|
||||
themes.defaultSeperatorHeight,
|
||||
level == 0 ? 0 : 4,
|
||||
themes.defaultSeperatorHeight),
|
||||
decoration: BoxDecoration(
|
||||
border: level == 0
|
||||
? const Border()
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:localization/localization.dart';
|
||||
|
@ -391,7 +392,10 @@ class _MakePostState extends State<MakePost> {
|
|||
));
|
||||
}
|
||||
|
||||
return SimpleDialog(
|
||||
return BackdropFilter(
|
||||
filter:
|
||||
ImageFilter.blur(sigmaX: 10, sigmaY: 10, tileMode: TileMode.mirror),
|
||||
child: SimpleDialog(
|
||||
titlePadding: const EdgeInsets.all(0),
|
||||
alignment: Alignment.center,
|
||||
contentPadding: themes.defaultMargins,
|
||||
|
@ -416,6 +420,7 @@ class _MakePostState extends State<MakePost> {
|
|||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import 'dart:async';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:localization/localization.dart';
|
||||
|
@ -168,7 +169,10 @@ class _ProfileViewState extends State<ProfileView> {
|
|||
),
|
||||
);
|
||||
|
||||
return SimpleDialog(
|
||||
return BackdropFilter(
|
||||
filter:
|
||||
ImageFilter.blur(sigmaX: 10, sigmaY: 10, tileMode: TileMode.mirror),
|
||||
child: SimpleDialog(
|
||||
alignment: Alignment.center,
|
||||
title: DisplayName(
|
||||
account: identities[activeIdentity]!,
|
||||
|
@ -223,7 +227,11 @@ class _ProfileViewState extends State<ProfileView> {
|
|||
return profileViewDisplay;
|
||||
} else if (index > 0 && index <= threads.length) {
|
||||
return Padding(
|
||||
padding: themes.defaultMargins,
|
||||
padding: const EdgeInsets.fromLTRB(
|
||||
themes.defaultSeperatorHeight * 2,
|
||||
0,
|
||||
themes.defaultSeperatorHeight * 2,
|
||||
0),
|
||||
child: Thread(
|
||||
model: threads[index - 1],
|
||||
constrained: false,
|
||||
|
@ -237,6 +245,7 @@ class _ProfileViewState extends State<ProfileView> {
|
|||
),
|
||||
]),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -370,7 +379,7 @@ class ProfileViewDisplay extends StatelessWidget {
|
|||
),
|
||||
if (relationshipModel != null)
|
||||
Padding(
|
||||
padding: themes.defaultMargins,
|
||||
padding: const EdgeInsets.all(themes.defaultSeperatorHeight),
|
||||
child: AccountInteractionButtons(
|
||||
account: accountModel,
|
||||
relationship: relationshipModel!,
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:localization/localization.dart';
|
||||
import 'package:loris/business_logic/account/account.dart';
|
||||
|
@ -53,7 +55,10 @@ class _SearchDialogueState extends State<SearchDialogue> {
|
|||
}
|
||||
},
|
||||
);
|
||||
return SimpleDialog(
|
||||
return BackdropFilter(
|
||||
filter:
|
||||
ImageFilter.blur(sigmaX: 10, sigmaY: 10, tileMode: TileMode.mirror),
|
||||
child: SimpleDialog(
|
||||
contentPadding: const EdgeInsets.all(0),
|
||||
titlePadding: const EdgeInsets.all(0),
|
||||
title: Column(
|
||||
|
@ -123,6 +128,7 @@ class _SearchDialogueState extends State<SearchDialogue> {
|
|||
}),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ class SingleNotif extends StatelessWidget {
|
|||
InkWell(
|
||||
borderRadius: const BorderRadius.all(themes.defaultRadius),
|
||||
onTap: () => showDialog(
|
||||
barrierColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) => ProfileView(model: model.account),
|
||||
),
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:localization/localization.dart';
|
||||
import 'package:loris/dialogues/makepost.dart';
|
||||
import 'package:loris/dialogues/search.dart';
|
||||
import 'package:loris/partials/thread.dart';
|
||||
import '../../business_logic/timeline/timeline.dart' as tl;
|
||||
|
@ -103,12 +104,41 @@ class TimelineState extends State<Timeline> {
|
|||
));
|
||||
}
|
||||
selectedId = global.settings!.activeIdentity;
|
||||
return Column(
|
||||
return SizedBox(
|
||||
height: MediaQuery.of(context).size.height - 52,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Material(
|
||||
Expanded(
|
||||
child: ListView.separated(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
controller: controller,
|
||||
itemBuilder: (context, index) {
|
||||
return children[index];
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
return const Divider(
|
||||
color: Colors.transparent,
|
||||
height: themes.defaultSeperatorHeight,
|
||||
);
|
||||
},
|
||||
itemCount: children.length,
|
||||
addAutomaticKeepAlives: false,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
width: 2,
|
||||
),
|
||||
)),
|
||||
child: Material(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
child: Wrap(
|
||||
spacing: 18,
|
||||
crossAxisAlignment: WrapCrossAlignment.center,
|
||||
alignment: WrapAlignment.spaceEvenly,
|
||||
children: [
|
||||
IconButton(
|
||||
|
@ -119,6 +149,7 @@ class TimelineState extends State<Timeline> {
|
|||
),
|
||||
IconButton(
|
||||
onPressed: () => showDialog(
|
||||
barrierColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) => const SearchDialogue(),
|
||||
),
|
||||
|
@ -199,28 +230,21 @@ class TimelineState extends State<Timeline> {
|
|||
});
|
||||
},
|
||||
),
|
||||
)
|
||||
),
|
||||
ElevatedButton.icon(
|
||||
onPressed: (() => showDialog(
|
||||
barrierColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) => const MakePost(),
|
||||
)),
|
||||
icon: const Icon(Icons.create),
|
||||
label: Text("write".i18n())),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: ListView.separated(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
controller: controller,
|
||||
itemBuilder: (context, index) {
|
||||
return children[index];
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
return const Divider(
|
||||
color: Colors.transparent,
|
||||
height: themes.defaultSeperatorHeight,
|
||||
);
|
||||
},
|
||||
itemCount: children.length,
|
||||
addAutomaticKeepAlives: false,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:localization/localization.dart';
|
||||
import 'package:loris/dialogues/makepost.dart';
|
||||
import 'package:loris/pages/chat/chat.dart';
|
||||
import 'package:loris/pages/notifications/notifications.dart';
|
||||
import 'package:loris/pages/timeline/timeline.dart';
|
||||
|
@ -47,13 +46,7 @@ class _MainScaffoldState extends State<MainScaffold> {
|
|||
settings(context),
|
||||
];
|
||||
final buttons = [
|
||||
FloatingActionButton(
|
||||
child: const Icon(Icons.create),
|
||||
onPressed: () => showDialog(
|
||||
context: context,
|
||||
builder: (context) => const MakePost(),
|
||||
),
|
||||
),
|
||||
null,
|
||||
FloatingActionButton(
|
||||
onPressed: () {},
|
||||
child: const Icon(Icons.person_add),
|
||||
|
@ -63,14 +56,16 @@ class _MainScaffoldState extends State<MainScaffold> {
|
|||
];
|
||||
return SafeArea(
|
||||
child: Scaffold(
|
||||
extendBody: true,
|
||||
extendBody: false,
|
||||
body: IndexedStack(
|
||||
index: index,
|
||||
children: screens,
|
||||
),
|
||||
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
|
||||
floatingActionButton: buttons[index],
|
||||
bottomNavigationBar: BottomAppBar(
|
||||
bottomNavigationBar: SizedBox(
|
||||
height: 52,
|
||||
child: BottomAppBar(
|
||||
child: NavigationBar(
|
||||
onDestinationSelected: (index) => setState(() {
|
||||
this.index = index;
|
||||
|
@ -90,10 +85,12 @@ class _MainScaffoldState extends State<MainScaffold> {
|
|||
: Icons.notifications),
|
||||
label: "notifications".i18n()),
|
||||
NavigationDestination(
|
||||
icon: const Icon(Icons.settings), label: "settings".i18n()),
|
||||
icon: const Icon(Icons.settings),
|
||||
label: "settings".i18n()),
|
||||
]),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,6 +93,7 @@ class DisplayName extends StatelessWidget {
|
|||
onTap: !openInBrowser
|
||||
? () {
|
||||
showDialog(
|
||||
barrierColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) => ProfileView(model: account),
|
||||
);
|
||||
|
@ -232,6 +233,7 @@ class _PostBodyState extends State<PostBody> {
|
|||
return InkWell(
|
||||
borderRadius: const BorderRadius.all(themes.defaultRadius),
|
||||
onTap: () => showDialog(
|
||||
barrierColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) => FullPostView(originPostModel: widget.model),
|
||||
),
|
||||
|
@ -323,6 +325,7 @@ class _PostActionBarState extends State<PostActionBar> {
|
|||
child: IconButton(
|
||||
onPressed: () {
|
||||
showDialog(
|
||||
barrierColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: ((context) => MakePost(
|
||||
inReplyTo: widget.model,
|
||||
|
@ -352,6 +355,7 @@ class _PostActionBarState extends State<PostActionBar> {
|
|||
tooltip: "show-in-full".i18n(),
|
||||
onPressed: () {
|
||||
showDialog(
|
||||
barrierColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) => FullPostView(
|
||||
originPostModel: widget.model,
|
||||
|
|
|
@ -9,6 +9,7 @@ import 'package:clipboard/clipboard.dart';
|
|||
|
||||
void popupPostOptions(context, PostModel model) {
|
||||
showModalBottomSheet(
|
||||
barrierColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) => PostOptions(model: model),
|
||||
);
|
||||
|
@ -52,6 +53,7 @@ class _PostOptionsState extends State<PostOptions> {
|
|||
),
|
||||
TextButton.icon(
|
||||
onPressed: () => showDialog(
|
||||
barrierColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) =>
|
||||
FullPostView(originPostModel: widget.model),
|
||||
|
|
|
@ -18,7 +18,7 @@ bool checkActive(Set<MaterialState> states) {
|
|||
const defaultRadius = Radius.circular(8);
|
||||
const defaultSeperatorHeight = 4.0;
|
||||
const defaultInsideMargins = EdgeInsets.all(18);
|
||||
const defaultMargins = EdgeInsets.all(18);
|
||||
const defaultMargins = EdgeInsets.fromLTRB(18, 8, 18, 8);
|
||||
|
||||
// color schemes to pick from can be added here
|
||||
// there is a class to create these
|
||||
|
@ -175,6 +175,9 @@ ThemeData getTheme(CustomColors colors) {
|
|||
color: colors.colorScheme.surface,
|
||||
),
|
||||
navigationBarTheme: NavigationBarThemeData(
|
||||
indicatorShape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(defaultRadius),
|
||||
),
|
||||
labelTextStyle: MaterialStateProperty.all(
|
||||
TextStyle(
|
||||
color: colors.colorScheme.onSurface,
|
||||
|
@ -182,10 +185,10 @@ ThemeData getTheme(CustomColors colors) {
|
|||
),
|
||||
),
|
||||
backgroundColor: Colors.transparent,
|
||||
labelBehavior: NavigationDestinationLabelBehavior.onlyShowSelected,
|
||||
indicatorColor: Colors.transparent,
|
||||
labelBehavior: NavigationDestinationLabelBehavior.alwaysHide,
|
||||
indicatorColor: colors.hoverColor,
|
||||
elevation: 0,
|
||||
height: 64,
|
||||
height: 52,
|
||||
),
|
||||
scrollbarTheme: ScrollbarThemeData(
|
||||
thumbColor: MaterialStateProperty.all(colors.hintColor),
|
||||
|
|
Loading…
Reference in New Issue