with another lib, still not working

This commit is contained in:
Henry Hiles 2026-01-11 17:37:52 -05:00
commit 5362e0dcde
No known key found for this signature in database
2 changed files with 70 additions and 73 deletions

View file

@ -124,11 +124,11 @@ class LoginPage extends HookConsumerWidget {
iconUrl: "https://federated.nexus/images/icon.png", iconUrl: "https://federated.nexus/images/icon.png",
), ),
Homeserver( Homeserver(
name: "envs.net", name: "Unredacted",
description: description:
"envs.net is a minimalist, non-commercial shared linux system and will always be free to use.", "Unredacted is a 501(c)(3) non-profit organization that builds Internet infrastructure and services to help people evade censorship and protect their right to privacy.",
url: Uri.https("envs.net"), url: Uri.https("unredacted.org", "services/si/matrix"),
iconUrl: "https://envs.net/favicon.ico", iconUrl: "https://unredacted.org/favicon.ico",
), ),
].map( ].map(
(homeserver) => Card( (homeserver) => Card(

View file

@ -1,9 +1,11 @@
import "dart:async";
import "package:dynamic_polls/dynamic_polls.dart";
import "package:flutter/material.dart"; import "package:flutter/material.dart";
import "package:flutter_chat_core/flutter_chat_core.dart"; import "package:flutter_chat_core/flutter_chat_core.dart";
import "package:flutter_chat_ui/flutter_chat_ui.dart"; import "package:flutter_chat_ui/flutter_chat_ui.dart";
import "package:flutter_hooks/flutter_hooks.dart"; import "package:flutter_hooks/flutter_hooks.dart";
import "package:flutter_link_previewer/flutter_link_previewer.dart"; import "package:flutter_link_previewer/flutter_link_previewer.dart";
import "package:flutter_polls/flutter_polls.dart";
import "package:flyer_chat_file_message/flyer_chat_file_message.dart"; import "package:flyer_chat_file_message/flyer_chat_file_message.dart";
import "package:flyer_chat_image_message/flyer_chat_image_message.dart"; import "package:flyer_chat_image_message/flyer_chat_image_message.dart";
import "package:flyer_chat_system_message/flyer_chat_system_message.dart"; import "package:flyer_chat_system_message/flyer_chat_system_message.dart";
@ -266,22 +268,10 @@ class RoomChat extends HookConsumerWidget {
return acc; return acc;
}); });
return Container( return Column(
decoration: BoxDecoration(
border: Border.all(
color: theme
.colorScheme
.primaryContainer,
width: 4,
),
borderRadius:
BorderRadius.circular(12),
),
padding: EdgeInsets.all(8),
width: 500,
child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
spacing: 4,
children: [ children: [
TopWidget( TopWidget(
message, message,
@ -291,52 +281,59 @@ class RoomChat extends HookConsumerWidget {
.headers, .headers,
groupStatus: groupStatus, groupStatus: groupStatus,
), ),
FlutterPolls( DynamicPolls(
votedCheckmark: const Icon( startDate: DateTime.now(),
Icons endDate: DateTime.now(),
.check_circle_outline_rounded, private:
size: 16, poll.kind ==
PollKind.undisclosed,
allowReselection: true,
backgroundDecoration:
BoxDecoration(
borderRadius:
BorderRadius.all(
Radius.circular(16),
), ),
pollId: message.id, border: Border.all(
onVoted: color: theme
(
pollOption,
newTotalVotes,
) async {
return true;
},
pollOptionsSplashColor: theme
.colorScheme .colorScheme
.primaryContainer, .primaryContainer,
voteInProgressColor: theme width: 4,
.colorScheme
.primaryContainer,
leadingVotedProgessColor:
theme
.colorScheme
.primaryContainer,
votedBackgroundColor: theme
.colorScheme
.surfaceContainer,
pollTitle: Text(
poll.question.mText,
), ),
pollOptions: poll.answers ),
allStyle: Styles(
titleStyle: TitleStyle(
style: theme
.textTheme
.headlineSmall,
),
optionStyle: OptionStyle(
fillColor: theme
.colorScheme
.primaryContainer,
selectedBorderColor: theme
.colorScheme
.primary,
borderColor: theme
.colorScheme
.primary,
unselectedBorderColor:
Colors.transparent,
textSelectColor: theme
.colorScheme
.primary,
),
),
onOptionSelected:
(int index) {},
title: poll.question.mText,
options: poll.answers
.map( .map(
(option) => PollOption( (option) => option.mText,
title: Text(
option.mText,
),
votes:
responses[option
.id] ??
0,
),
) )
.toList(), .toList(),
), ),
], ],
),
); );
}, },