1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-07-01 06:03:29 +00:00

24 Commits

Author SHA1 Message Date
61e279f719 Show banner in tablet mode 2021-12-30 13:45:22 +01:00
94ae3434e4 Adapt banner to large screens 2021-12-30 13:36:12 +01:00
78ae2a574a Show banner on Forez main route 2021-12-30 12:32:50 +01:00
75b06e7df8 Show banner on welcome route 2021-12-30 12:28:06 +01:00
71a72d4f04 Add support for banner timeout 2021-12-30 12:22:10 +01:00
90b3ffbe81 Fix lang selection 2021-12-30 12:11:26 +01:00
bfe932c053 Start to display banner 2021-12-30 12:02:18 +01:00
4fd8c4d613 Fix deprecated methods call 2021-12-28 19:09:00 +01:00
ecc4f5bffe Update some Gradle dependencies 2021-12-28 19:03:37 +01:00
c849ee0bac Update Gradle & Target sdk 32 2021-12-28 18:35:32 +01:00
04114dede1 Update Gradle version to 6.2 2021-12-28 17:49:33 +01:00
fff33f907a Update firebase_messaging dependency 2021-12-28 17:29:05 +01:00
9a82301c52 Update web_socket_channel dependency 2021-12-28 17:25:49 +01:00
48ececf93c Update video_thumbnail dependency 2021-12-28 17:23:26 +01:00
bc6068c2a1 Update record_mp3 dependency 2021-12-28 17:18:37 +01:00
5b680bb922 Fix issue on posts list not refreshing when a new post is created 2021-12-28 17:15:25 +01:00
2b05fbda35 Update image_picker dependency 2021-12-28 17:06:21 +01:00
30494ff74a Update flutter_webrtc dependency 2021-12-28 16:59:32 +01:00
062abc5a03 Update file_picker dependency 2021-12-28 16:46:46 +01:00
21506f769e Updated cached_network_image package 2021-12-28 16:43:15 +01:00
e180f0bc13 Replace identicon with jdenticon 2021-12-28 16:34:14 +01:00
7ae50e21a4 Fix all code warnings 2021-12-28 15:33:27 +01:00
ae75429b1d Update to Flutter 2.8.1 2021-12-28 15:23:08 +01:00
f2380ba60a Start to work on version 1.1.10 2021-10-28 16:30:22 +02:00
58 changed files with 566 additions and 246 deletions

2
.gitignore vendored
View File

@ -74,3 +74,5 @@ lib/*private*.dart
.flutter-plugins-dependencies .flutter-plugins-dependencies
local.properties
.gradle

View File

@ -33,7 +33,7 @@ if (keystorePropertiesFile.exists()) {
} }
android { android {
compileSdkVersion 30 compileSdkVersion 31
compileOptions { compileOptions {
@ -45,12 +45,15 @@ android {
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
// TODO remove this fix to use Gradle plugin 4 ASAP
checkReleaseBuilds false
} }
defaultConfig { defaultConfig {
applicationId "org.communiquons.comunic" applicationId "org.communiquons.comunic"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 30 targetSdkVersion 31
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@ -110,9 +113,9 @@ flutter {
dependencies { dependencies {
implementation 'com.neovisionaries:nv-websocket-client:2.14' implementation 'com.neovisionaries:nv-websocket-client:2.14'
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
} }
apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.gms.google-services'

View File

@ -59,7 +59,8 @@
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize"
android:exported="true">
<!-- This keeps the window background of the activity showing <!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen there is no splash screen (such as the default splash screen
@ -69,12 +70,6 @@
android:name="io.flutter.embedding.android.NormalTheme" android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" /> android:resource="@style/NormalTheme" />
<!-- Specify that the launch screen should continue being displayed -->
<!-- until Flutter renders its first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background" />
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />

View File

@ -100,7 +100,10 @@ public class NotificationsService extends Service implements Runnable {
Intent notificationIntent = new Intent(this, MainActivity.class); Intent notificationIntent = new Intent(this, MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, PendingIntent pendingIntent = PendingIntent.getActivity(this,
0, notificationIntent, 0); 0,
notificationIntent,
android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M ? PendingIntent.FLAG_IMMUTABLE : 0);
Notification notification = new NotificationCompat.Builder(this, SVC_CHANNEL_ID) Notification notification = new NotificationCompat.Builder(this, SVC_CHANNEL_ID)
.setContentTitle("Comunic") .setContentTitle("Comunic")
.setContentText(getText(R.string.independent_push_notification_notification_text)) .setContentText(getText(R.string.independent_push_notification_notification_text))
@ -197,12 +200,12 @@ public class NotificationsService extends Service implements Runnable {
ws.setPingInterval(PING_INTERVAL); ws.setPingInterval(PING_INTERVAL);
ws.addListener(new WebSocketAdapter() { ws.addListener(new WebSocketAdapter() {
@Override @Override
public void onConnected(WebSocket websocket, Map<String, List<String>> headers) throws Exception { public void onConnected(WebSocket websocket, Map<String, List<String>> headers) {
Log.v(TAG, "Connected to independent push notifications service!"); Log.v(TAG, "Connected to independent push notifications service!");
} }
@Override @Override
public void onDisconnected(WebSocket websocket, WebSocketFrame serverCloseFrame, WebSocketFrame clientCloseFrame, boolean closedByServer) throws Exception { public void onDisconnected(WebSocket websocket, WebSocketFrame serverCloseFrame, WebSocketFrame clientCloseFrame, boolean closedByServer) {
Log.v(TAG, "Disconnected from independent push notifications websocket!"); Log.v(TAG, "Disconnected from independent push notifications websocket!");
synchronized (lock) { synchronized (lock) {
lock.notify(); lock.notify();
@ -210,12 +213,12 @@ public class NotificationsService extends Service implements Runnable {
} }
@Override @Override
public void onTextFrame(WebSocket websocket, WebSocketFrame frame) throws Exception { public void onTextFrame(WebSocket websocket, WebSocketFrame frame) {
handleTextFrame(frame); handleTextFrame(frame);
} }
@Override @Override
public void onError(WebSocket websocket, WebSocketException cause) throws Exception { public void onError(WebSocket websocket, WebSocketException cause) {
Log.e(TAG, "An error occured, closing WebSocket!"); Log.e(TAG, "An error occured, closing WebSocket!");
cause.printStackTrace(); cause.printStackTrace();
websocket.disconnect(); websocket.disconnect();
@ -254,17 +257,14 @@ public class NotificationsService extends Service implements Runnable {
} }
} }
private void dropNotification(String id) throws Exception { private void dropNotification(String id) {
new Handler(Looper.getMainLooper()).post(new Runnable() { new Handler(Looper.getMainLooper()).post(() -> {
@Override NotificationManagerCompat notifManager = NotificationManagerCompat.from(NotificationsService.this);
public void run() { notifManager.cancel(id, NOTIFS_ID);
NotificationManagerCompat notifManager = NotificationManagerCompat.from(NotificationsService.this);
notifManager.cancel(id, NOTIFS_ID);
}
}); });
} }
private void sendNotification(PushNotification n) throws Exception { private void sendNotification(PushNotification n) {
new Handler(Looper.getMainLooper()).post(() -> postNotification(n)); new Handler(Looper.getMainLooper()).post(() -> postNotification(n));
} }
@ -273,7 +273,12 @@ public class NotificationsService extends Service implements Runnable {
createPushNotificationChannel(); createPushNotificationChannel();
Intent intent = new Intent(this, MainActivity.class); Intent intent = new Intent(this, MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0); PendingIntent pendingIntent = PendingIntent.getActivity(
this,
0,
intent,
android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M ? PendingIntent.FLAG_IMMUTABLE : 0
);
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, NOTIFS_CHANNEL_ID) NotificationCompat.Builder builder = new NotificationCompat.Builder(this, NOTIFS_CHANNEL_ID)
.setSmallIcon(R.drawable.ic_notifications) .setSmallIcon(R.drawable.ic_notifications)

View File

@ -1,21 +1,21 @@
buildscript { buildscript {
repositories { repositories {
google() google()
jcenter() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.5.4' classpath 'com.android.tools.build:gradle:4.1.3'
// Firebase // Firebase
classpath 'com.google.gms:google-services:4.3.5' classpath 'com.google.gms:google-services:4.3.10'
} }
} }
allprojects { allprojects {
repositories { repositories {
google() google()
jcenter() mavenCentral()
} }
} }

View File

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip

View File

@ -5,7 +5,7 @@ make stable_release_split_per_abi && \
mv build/app/outputs/flutter-apk/app-armeabi-v7a-stable-release.apk "$DEST" && \ mv build/app/outputs/flutter-apk/app-armeabi-v7a-stable-release.apk "$DEST" && \
mv build/app/outputs/flutter-apk/app-arm64-v8a-stable-release.apk "$DEST" && \ mv build/app/outputs/flutter-apk/app-arm64-v8a-stable-release.apk "$DEST" && \
mv build/app/outputs/flutter-apk/app-x86_64-stable-release.apk "$DEST" && \ mv build/app/outputs/flutter-apk/app-x86_64-stable-release.apk "$DEST" && \
mv build/app/outputs/mapping/stable/release/mapping.txt "$DEST" && \ mv build/app/outputs/mapping/stableRelease/mapping.txt "$DEST" && \
make stable_release && \ make stable_release && \
mv build/app/outputs/flutter-apk/app-stable-release.apk "$DEST" mv build/app/outputs/flutter-apk/app-stable-release.apk "$DEST"

View File

@ -5,4 +5,4 @@ make forez_release_split_per_abi && \
mv build/app/outputs/flutter-apk/app-armeabi-v7a-forez-release.apk "$DEST" && \ mv build/app/outputs/flutter-apk/app-armeabi-v7a-forez-release.apk "$DEST" && \
mv build/app/outputs/flutter-apk/app-arm64-v8a-forez-release.apk "$DEST" && \ mv build/app/outputs/flutter-apk/app-arm64-v8a-forez-release.apk "$DEST" && \
mv build/app/outputs/flutter-apk/app-x86_64-forez-release.apk "$DEST" && \ mv build/app/outputs/flutter-apk/app-x86_64-forez-release.apk "$DEST" && \
mv build/app/outputs/mapping/forez/release/mapping.txt "$DEST" mv build/app/outputs/mapping/forezRelease/mapping.txt "$DEST"

View File

@ -9,6 +9,7 @@ import 'package:comunic/ui/routes/main_route/page_info.dart';
import 'package:comunic/ui/screens/conversations_list_screen.dart'; import 'package:comunic/ui/screens/conversations_list_screen.dart';
import 'package:comunic/ui/screens/group_sections/forez_presence_section.dart'; import 'package:comunic/ui/screens/group_sections/forez_presence_section.dart';
import 'package:comunic/ui/screens/group_sections/group_posts_section.dart'; import 'package:comunic/ui/screens/group_sections/group_posts_section.dart';
import 'package:comunic/ui/widgets/banner_widget.dart';
import 'package:comunic/ui/widgets/safe_state.dart'; import 'package:comunic/ui/widgets/safe_state.dart';
import 'package:comunic/ui/widgets/status_widget.dart'; import 'package:comunic/ui/widgets/status_widget.dart';
import 'package:comunic/ui/widgets/tab_transition_widget.dart'; import 'package:comunic/ui/widgets/tab_transition_widget.dart';
@ -115,7 +116,12 @@ class _ForezRouteBodyState extends SafeState<ForezRouteBody> {
actions: <Widget>[_buildPopupMenuButton()], actions: <Widget>[_buildPopupMenuButton()],
bottom: TabBar(tabs: _tabs), bottom: TabBar(tabs: _tabs),
), ),
body: TabBarView(children: _tabsPages), body: Column(
children: [
BannerWidget(),
Expanded(child: TabBarView(children: _tabsPages)),
],
),
), ),
); );
} }

View File

@ -2,10 +2,11 @@
// Generated file. Do not edit. // Generated file. Do not edit.
// //
// ignore_for_file: directives_ordering
// ignore_for_file: lines_longer_than_80_chars // ignore_for_file: lines_longer_than_80_chars
import 'package:connectivity_for_web/connectivity_for_web.dart'; import 'package:connectivity_for_web/connectivity_for_web.dart';
import 'package:file_picker/src/file_picker_web.dart'; import 'package:file_picker/_internal/file_picker_web.dart';
import 'package:firebase_core_web/firebase_core_web.dart'; import 'package:firebase_core_web/firebase_core_web.dart';
import 'package:firebase_messaging_web/firebase_messaging_web.dart'; import 'package:firebase_messaging_web/firebase_messaging_web.dart';
import 'package:image_picker_for_web/image_picker_for_web.dart'; import 'package:image_picker_for_web/image_picker_for_web.dart';

View File

@ -17,6 +17,7 @@ class ServerConfigurationHelper {
(await APIRequest.withoutLogin("server/config").execWithThrow()) (await APIRequest.withoutLogin("server/config").execWithThrow())
.getObject(); .getObject();
final banner = response["banner"];
final pushNotificationsPolicy = response["push_notifications"]; final pushNotificationsPolicy = response["push_notifications"];
final passwordPolicy = response["password_policy"]; final passwordPolicy = response["password_policy"];
final dataConservationPolicy = response["data_conservation_policy"]; final dataConservationPolicy = response["data_conservation_policy"];
@ -31,6 +32,15 @@ class ServerConfigurationHelper {
contactEmail: response["contact_email"], contactEmail: response["contact_email"],
playStoreURL: response["play_store_url"], playStoreURL: response["play_store_url"],
androidDirectDownloadURL: response["android_direct_download_url"], androidDirectDownloadURL: response["android_direct_download_url"],
banner: banner == null
? null
: Banner(
enabled: banner["enabled"],
expire: banner["expire"],
nature: BannerNatureExt.fromStr(banner["nature"]),
message: Map<String, dynamic>.from(banner["message"])
.map((key, value) => MapEntry(key, value.toString())),
link: banner["link"]),
notificationsPolicy: NotificationsPolicy( notificationsPolicy: NotificationsPolicy(
hasFirebase: pushNotificationsPolicy["has_firebase"], hasFirebase: pushNotificationsPolicy["has_firebase"],
hasIndependent: pushNotificationsPolicy["has_independent"], hasIndependent: pushNotificationsPolicy["has_independent"],
@ -98,3 +108,5 @@ class ServerConfigurationHelper {
/// Shortcut for server configuration /// Shortcut for server configuration
ServerConfig get srvConfig => ServerConfigurationHelper.config; ServerConfig get srvConfig => ServerConfigurationHelper.config;
bool get showBanner => srvConfig.banner != null && srvConfig.banner.visible;

View File

@ -9,6 +9,7 @@ import 'package:comunic/utils/flutter_utils.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:connectivity/connectivity.dart'; import 'package:connectivity/connectivity.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
/// Main file of the application /// Main file of the application
/// ///
@ -68,7 +69,8 @@ class ComunicApplicationState extends State<ComunicApplication> {
primaryColor: config().primaryColor, primaryColor: config().primaryColor,
primaryColorDark: config().primaryColorDark, primaryColorDark: config().primaryColorDark,
appBarTheme: AppBarTheme( appBarTheme: AppBarTheme(
brightness: Brightness.dark, backgroundColor: config().primaryColor,
systemOverlayStyle: SystemUiOverlayStyle.light,
)), )),
showPerformanceOverlay: prefs.showPerformancesOverlay, showPerformanceOverlay: prefs.showPerformancesOverlay,
); );

View File

@ -1,8 +1,5 @@
import 'dart:ui';
import 'package:comunic/ui/routes/tour_route.dart'; import 'package:comunic/ui/routes/tour_route.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
/// Application configuration model /// Application configuration model
/// ///

View File

@ -2,7 +2,6 @@ import 'package:comunic/helpers/serialization/base_serialization_helper.dart';
import 'package:comunic/models/conversation_member.dart'; import 'package:comunic/models/conversation_member.dart';
import 'package:comunic/utils/account_utils.dart'; import 'package:comunic/utils/account_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
import 'group.dart'; import 'group.dart';

View File

@ -4,7 +4,6 @@ import 'package:comunic/models/displayed_content.dart';
import 'package:comunic/utils/account_utils.dart' as account; import 'package:comunic/utils/account_utils.dart' as account;
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
/// Single conversation message /// Single conversation message
/// ///
@ -132,10 +131,14 @@ class ConversationServerMessage {
return Set()..add(userID); return Set()..add(userID);
case ConversationServerMessageType.USER_ADDED_ANOTHER_USER: case ConversationServerMessageType.USER_ADDED_ANOTHER_USER:
return Set()..add(userWhoAdded)..add(userAdded); return Set()
..add(userWhoAdded)
..add(userAdded);
case ConversationServerMessageType.USER_REMOVED_ANOTHER_USER: case ConversationServerMessageType.USER_REMOVED_ANOTHER_USER:
return Set()..add(userWhoRemoved)..add(userRemoved); return Set()
..add(userWhoRemoved)
..add(userRemoved);
} }
throw Exception("Unsupported server message type!"); throw Exception("Unsupported server message type!");

View File

@ -1,3 +1,4 @@
import 'package:comunic/utils/date_utils.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:version/version.dart'; import 'package:version/version.dart';
@ -132,6 +133,42 @@ class AccountInformationPolicy {
assert(maxLocationLength != null); assert(maxLocationLength != null);
} }
enum BannerNature { Information, Warning, Success }
extension BannerNatureExt on BannerNature {
static BannerNature fromStr(String s) {
switch (s) {
case "information":
return BannerNature.Information;
case "success":
return BannerNature.Success;
case "warning":
default:
return BannerNature.Warning;
}
}
}
class Banner {
final bool enabled;
final int expire;
final BannerNature nature;
final Map<String, String> message;
final String link;
const Banner({
@required this.enabled,
@required this.expire,
@required this.nature,
@required this.message,
@required this.link,
}) : assert(enabled != null),
assert(nature != null),
assert(message != null);
bool get visible => enabled && (expire == null || expire > time());
}
class ServerConfig { class ServerConfig {
final Version minSupportedMobileVersion; final Version minSupportedMobileVersion;
final String termsURL; final String termsURL;
@ -139,6 +176,7 @@ class ServerConfig {
final String contactEmail; final String contactEmail;
final String playStoreURL; final String playStoreURL;
final String androidDirectDownloadURL; final String androidDirectDownloadURL;
final Banner banner;
final NotificationsPolicy notificationsPolicy; final NotificationsPolicy notificationsPolicy;
final PasswordPolicy passwordPolicy; final PasswordPolicy passwordPolicy;
final ServerDataConservationPolicy dataConservationPolicy; final ServerDataConservationPolicy dataConservationPolicy;
@ -152,6 +190,7 @@ class ServerConfig {
@required this.contactEmail, @required this.contactEmail,
@required this.playStoreURL, @required this.playStoreURL,
@required this.androidDirectDownloadURL, @required this.androidDirectDownloadURL,
@required this.banner,
@required this.notificationsPolicy, @required this.notificationsPolicy,
@required this.passwordPolicy, @required this.passwordPolicy,
@required this.dataConservationPolicy, @required this.dataConservationPolicy,

View File

@ -1,7 +1,6 @@
import 'package:chewie_audio/chewie_audio.dart'; import 'package:chewie_audio/chewie_audio.dart';
import 'package:comunic/ui/widgets/async_screen_widget.dart'; import 'package:comunic/ui/widgets/async_screen_widget.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart'; import 'package:video_player/video_player.dart';

View File

@ -1,7 +1,6 @@
import 'package:comunic/ui/dialogs/single_input_dialog.dart'; import 'package:comunic/ui/dialogs/single_input_dialog.dart';
import 'package:comunic/utils/input_utils.dart'; import 'package:comunic/utils/input_utils.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/// Ask the user to enter an URL /// Ask the user to enter an URL

View File

@ -1,6 +1,5 @@
import 'package:comunic/ui/dialogs/single_input_dialog.dart'; import 'package:comunic/ui/dialogs/single_input_dialog.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/// Add YouTube link dialog /// Add YouTube link dialog

View File

@ -1,6 +1,5 @@
import 'package:comunic/ui/widgets/dialogs/auto_sized_dialog_content_widget.dart'; import 'package:comunic/ui/widgets/dialogs/auto_sized_dialog_content_widget.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/// Build and show a dialog to offer to the user to choose between several /// Build and show a dialog to offer to the user to choose between several

View File

@ -8,7 +8,6 @@ import 'package:comunic/utils/ui_utils.dart';
import 'package:file_picker/file_picker.dart'; import 'package:file_picker/file_picker.dart';
import 'package:filesize/filesize.dart'; import 'package:filesize/filesize.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:image_cropper/image_cropper.dart'; import 'package:image_cropper/image_cropper.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
import 'package:mime/mime.dart'; import 'package:mime/mime.dart';
@ -124,7 +123,7 @@ Future<BytesFile> showPickFileDialog({
// Pick an image // Pick an image
case _FileChoices.PICK_IMAGE: case _FileChoices.PICK_IMAGE:
case _FileChoices.TAKE_PICTURE: case _FileChoices.TAKE_PICTURE:
final image = await ImagePicker().getImage( final image = await ImagePicker().pickImage(
source: choice == _FileChoices.PICK_IMAGE source: choice == _FileChoices.PICK_IMAGE
? ImageSource.gallery ? ImageSource.gallery
: ImageSource.camera, : ImageSource.camera,
@ -143,7 +142,7 @@ Future<BytesFile> showPickFileDialog({
// Pick an video // Pick an video
case _FileChoices.PICK_VIDEO: case _FileChoices.PICK_VIDEO:
case _FileChoices.TAKE_VIDEO: case _FileChoices.TAKE_VIDEO:
final image = await ImagePicker().getVideo( final image = await ImagePicker().pickVideo(
source: choice == _FileChoices.PICK_VIDEO source: choice == _FileChoices.PICK_VIDEO
? ImageSource.gallery ? ImageSource.gallery
: ImageSource.camera, : ImageSource.camera,

View File

@ -4,7 +4,6 @@ import 'package:comunic/ui/widgets/dialogs/confirm_dialog_button.dart';
import 'package:comunic/ui/widgets/pick_user_widget.dart'; import 'package:comunic/ui/widgets/pick_user_widget.dart';
import 'package:comunic/ui/widgets/safe_state.dart'; import 'package:comunic/ui/widgets/safe_state.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/// Pick user dialog /// Pick user dialog

View File

@ -2,7 +2,6 @@ import 'package:comunic/enums/post_visibility_level.dart';
import 'package:comunic/ui/tiles/post_visibility_level_tile.dart'; import 'package:comunic/ui/tiles/post_visibility_level_tile.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
/// Post utilities /// Post utilities
/// ///

View File

@ -1,7 +1,6 @@
import 'dart:math'; import 'dart:math';
import 'package:comunic/utils/ui_utils.dart'; import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/// Screen dialog /// Screen dialog

View File

@ -1,5 +1,4 @@
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/// Dialog to use to ask the user to enter a value /// Dialog to use to ask the user to enter a value

View File

@ -2,7 +2,6 @@ import 'package:comunic/helpers/groups_helper.dart';
import 'package:comunic/helpers/settings_helper.dart'; import 'package:comunic/helpers/settings_helper.dart';
import 'package:comunic/ui/widgets/safe_state.dart'; import 'package:comunic/ui/widgets/safe_state.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/// Show a dialog to offer the user to pick a virtual directory /// Show a dialog to offer the user to pick a virtual directory

View File

@ -6,9 +6,7 @@ import 'package:comunic/ui/widgets/safe_state.dart';
import 'package:comunic/utils/input_utils.dart'; import 'package:comunic/utils/input_utils.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:comunic/utils/ui_utils.dart'; import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
/// Reset password route /// Reset password route
/// ///

View File

@ -1,6 +1,7 @@
import 'package:comunic/ui/routes/main_route/main_route.dart'; import 'package:comunic/ui/routes/main_route/main_route.dart';
import 'package:comunic/ui/routes/main_route/page_info.dart'; import 'package:comunic/ui/routes/main_route/page_info.dart';
import 'package:comunic/ui/screens/notifications_screen.dart'; import 'package:comunic/ui/screens/notifications_screen.dart';
import 'package:comunic/ui/widgets/banner_widget.dart';
import 'package:comunic/ui/widgets/mobile_mode/mobile_appbar_widget.dart'; import 'package:comunic/ui/widgets/mobile_mode/mobile_appbar_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -33,7 +34,14 @@ class _MainRouteState extends MainController {
appBar: currentPage.hideNavBar appBar: currentPage.hideNavBar
? null ? null
: ComunicMobileAppBar(currentPage: currentPage), : ComunicMobileAppBar(currentPage: currentPage),
body: SafeArea(key: currentPage.key, child: currentPage.child), body: SafeArea(
key: currentPage.key,
child: Column(
children: [
BannerWidget(),
Expanded(child: currentPage.child)
],
)),
), ),
), ),
), ),

View File

@ -3,6 +3,7 @@ import 'package:comunic/ui/dialogs/screen_dialog.dart';
import 'package:comunic/ui/routes/main_route/main_route.dart'; import 'package:comunic/ui/routes/main_route/main_route.dart';
import 'package:comunic/ui/routes/main_route/page_info.dart'; import 'package:comunic/ui/routes/main_route/page_info.dart';
import 'package:comunic/ui/screens/newest_posts.dart'; import 'package:comunic/ui/screens/newest_posts.dart';
import 'package:comunic/ui/widgets/banner_widget.dart';
import 'package:comunic/ui/widgets/tablet_mode/calls/calls_area.dart'; import 'package:comunic/ui/widgets/tablet_mode/calls/calls_area.dart';
import 'package:comunic/ui/widgets/tablet_mode/conversations/conversations_area_widget.dart'; import 'package:comunic/ui/widgets/tablet_mode/conversations/conversations_area_widget.dart';
import 'package:comunic/ui/widgets/tablet_mode/current_user_panel.dart'; import 'package:comunic/ui/widgets/tablet_mode/current_user_panel.dart';
@ -79,7 +80,12 @@ class _TabletRouteState extends MainController {
Widget _buildRightPane() => Container( Widget _buildRightPane() => Container(
key: currentPage.key, key: currentPage.key,
width: MediaQuery.of(context).size.width - _SideBarSize, width: MediaQuery.of(context).size.width - _SideBarSize,
child: currentPage.child, child: Column(
children: [
BannerWidget(),
Expanded(child: currentPage.child),
],
),
); );
@override @override

View File

@ -4,7 +4,7 @@ import 'package:comunic/utils/flutter_utils.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:comunic/utils/ui_utils.dart'; import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:settings_ui/settings_ui.dart'; import 'package:flutter_settings_ui/flutter_settings_ui.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
/// About application settings /// About application settings

View File

@ -8,13 +8,12 @@ import 'package:comunic/ui/widgets/settings/header_spacer_section.dart';
import 'package:comunic/ui/widgets/settings/multi_choices_settings_tile.dart'; import 'package:comunic/ui/widgets/settings/multi_choices_settings_tile.dart';
import 'package:comunic/utils/account_utils.dart'; import 'package:comunic/utils/account_utils.dart';
import 'package:comunic/utils/files_utils.dart'; import 'package:comunic/utils/files_utils.dart';
import 'package:comunic/utils/identicon_utils.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:comunic/utils/ui_utils.dart'; import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:identicon/identicon.dart'; import 'package:flutter_settings_ui/flutter_settings_ui.dart';
import 'package:image_cropper/image_cropper.dart'; import 'package:image_cropper/image_cropper.dart';
import 'package:random_string/random_string.dart';
import 'package:settings_ui/settings_ui.dart';
import '../../../utils/log_utils.dart'; import '../../../utils/log_utils.dart';
import '../../../utils/ui_utils.dart'; import '../../../utils/ui_utils.dart';
@ -167,7 +166,7 @@ class _AccountImageSettingsScreenState
/// Generate a random account image /// Generate a random account image
void _generateRandomAccountImage() async { void _generateRandomAccountImage() async {
// Generate emoticon // Generate emoticon
final bytes = Identicon().generate(randomString(10)); final bytes = await genIdenticon(context);
if (!await SettingsHelper.uploadAccountImageFromMemory(bytes)) { if (!await SettingsHelper.uploadAccountImageFromMemory(bytes)) {
showSimpleSnack( showSimpleSnack(

View File

@ -12,8 +12,7 @@ import 'package:comunic/utils/flutter_utils.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:comunic/utils/ui_utils.dart'; import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter_settings_ui/flutter_settings_ui.dart';
import 'package:settings_ui/settings_ui.dart';
/// Account privacy settings /// Account privacy settings
/// ///
@ -176,7 +175,7 @@ class DataConservationPolicyTile extends SettingsTile {
final Function(int) onChange; final Function(int) onChange;
final int minValue; final int minValue;
const DataConservationPolicyTile({ DataConservationPolicyTile({
@required this.value, @required this.value,
@required this.title, @required this.title,
@required this.onChange, @required this.onChange,

View File

@ -12,7 +12,7 @@ import 'package:comunic/utils/flutter_utils.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:comunic/utils/ui_utils.dart'; import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:settings_ui/settings_ui.dart'; import 'package:flutter_settings_ui/flutter_settings_ui.dart';
/// Account security settings /// Account security settings
/// ///

View File

@ -12,7 +12,7 @@ import 'package:comunic/utils/flutter_utils.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:comunic/utils/ui_utils.dart'; import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:settings_ui/settings_ui.dart'; import 'package:flutter_settings_ui/flutter_settings_ui.dart';
enum _MainMenuActions { SHOW_TOUR } enum _MainMenuActions { SHOW_TOUR }

View File

@ -5,7 +5,7 @@ import 'package:comunic/utils/flutter_utils.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:comunic/utils/ui_utils.dart'; import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:settings_ui/settings_ui.dart'; import 'package:flutter_settings_ui/flutter_settings_ui.dart';
/// Application settings /// Application settings
/// ///
@ -94,7 +94,7 @@ class _PreferencesSettingsTile extends SettingsTile {
final Function onChange; final Function onChange;
final PreferencesHelper helper; final PreferencesHelper helper;
const _PreferencesSettingsTile({ _PreferencesSettingsTile({
@required this.preferencesKey, @required this.preferencesKey,
@required this.title, @required this.title,
@required this.subtitle, @required this.subtitle,

View File

@ -14,7 +14,7 @@ import 'package:comunic/utils/input_utils.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:comunic/utils/ui_utils.dart'; import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:settings_ui/settings_ui.dart'; import 'package:flutter_settings_ui/flutter_settings_ui.dart';
/// General account settings /// General account settings
/// ///

View File

@ -8,7 +8,7 @@ import 'package:comunic/utils/intl_utils.dart';
import 'package:comunic/utils/log_utils.dart'; import 'package:comunic/utils/log_utils.dart';
import 'package:comunic/utils/ui_utils.dart'; import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:settings_ui/settings_ui.dart'; import 'package:flutter_settings_ui/flutter_settings_ui.dart';
/// Notifications settings /// Notifications settings
/// ///

View File

@ -2,7 +2,6 @@ import 'package:comunic/helpers/posts_helper.dart';
import 'package:comunic/lists/posts_list.dart'; import 'package:comunic/lists/posts_list.dart';
import 'package:comunic/ui/widgets/posts_list_widget.dart'; import 'package:comunic/ui/widgets/posts_list_widget.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/// Single post route /// Single post route

View File

@ -19,14 +19,13 @@ import 'package:comunic/ui/widgets/settings/header_spacer_section.dart';
import 'package:comunic/ui/widgets/settings/multi_choices_settings_tile.dart'; import 'package:comunic/ui/widgets/settings/multi_choices_settings_tile.dart';
import 'package:comunic/ui/widgets/settings/text_settings_edit_tile.dart'; import 'package:comunic/ui/widgets/settings/text_settings_edit_tile.dart';
import 'package:comunic/utils/files_utils.dart'; import 'package:comunic/utils/files_utils.dart';
import 'package:comunic/utils/identicon_utils.dart';
import 'package:comunic/utils/input_utils.dart'; import 'package:comunic/utils/input_utils.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:comunic/utils/log_utils.dart'; import 'package:comunic/utils/log_utils.dart';
import 'package:comunic/utils/ui_utils.dart'; import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:identicon/identicon.dart'; import 'package:flutter_settings_ui/flutter_settings_ui.dart';
import 'package:random_string/random_string.dart';
import 'package:settings_ui/settings_ui.dart';
/// Groups settings screen /// Groups settings screen
/// ///
@ -313,12 +312,12 @@ class _GroupSettingsScreenState extends SafeState<GroupSettingsScreen> {
) )
.toList() .toList()
.cast<SettingsTile>() .cast<SettingsTile>()
..add( ..add(
SettingsTile( SettingsTile(
title: tr("Create a new conversation"), title: tr("Create a new conversation"),
onPressed: _createNewGroupConversation, onPressed: _createNewGroupConversation,
), ),
), ),
); );
void _createNewGroupConversation(BuildContext context) async { void _createNewGroupConversation(BuildContext context) async {
@ -432,8 +431,7 @@ class _GroupSettingsScreenState extends SafeState<GroupSettingsScreen> {
/// Generate a new random logo for the group /// Generate a new random logo for the group
void _generateRandomLogo() async { void _generateRandomLogo() async {
try { try {
final newLogo = final newLogo = await genIdenticon(context);
Identicon(rows: 10, cols: 10).generate(randomString(20), size: 100);
await _doUploadLogo(newLogo); await _doUploadLogo(newLogo);
} catch (e, stack) { } catch (e, stack) {
print("Could not generate new logo! $e\n$stack"); print("Could not generate new logo! $e\n$stack");

View File

@ -15,7 +15,6 @@ import 'package:comunic/utils/intl_utils.dart';
import 'package:comunic/utils/navigation_utils.dart'; import 'package:comunic/utils/navigation_utils.dart';
import 'package:comunic/utils/ui_utils.dart'; import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
/// Notifications screen /// Notifications screen
/// ///

View File

@ -29,6 +29,7 @@ class _UserPostsSectionState extends State<UserPostsSection> {
@override @override
Widget build(BuildContext context) => PostsListWidget( Widget build(BuildContext context) => PostsListWidget(
key: _postsKey,
topWidgets: [ topWidgets: [
widget.user.canPostTexts widget.user.canPostTexts
? PostCreateFormWidget( ? PostCreateFormWidget(

View File

@ -25,7 +25,6 @@ import 'package:comunic/utils/intl_utils.dart';
import 'package:comunic/utils/navigation_utils.dart'; import 'package:comunic/utils/navigation_utils.dart';
import 'package:comunic/utils/ui_utils.dart'; import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import '../../models/api_request.dart'; import '../../models/api_request.dart';

View File

@ -0,0 +1,113 @@
import 'dart:async';
import 'package:comunic/helpers/server_config_helper.dart';
import 'package:comunic/models/server_config.dart';
import 'package:comunic/utils/date_utils.dart';
import 'package:comunic/utils/intl_utils.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
bool _bannerDismissed = false;
class BannerWidget extends StatefulWidget {
const BannerWidget({Key key}) : super(key: key);
@override
_BannerWidgetState createState() => _BannerWidgetState();
}
class _BannerWidgetState extends State<BannerWidget> {
Timer _timer;
bool get _shouldShowBanner => showBanner && !_bannerDismissed;
void _hideBanner() {
if (this.mounted) setState(() => _bannerDismissed = true);
}
void _openLink() {
launch(srvConfig.banner.link);
}
@override
void initState() {
super.initState();
if (_shouldShowBanner && srvConfig.banner.expire != null) {
_timer = Timer(
Duration(seconds: srvConfig.banner.expire - time()), _hideBanner);
}
}
@override
void dispose() {
if (_timer != null) _timer.cancel();
super.dispose();
}
@override
Widget build(BuildContext context) {
if (!_shouldShowBanner) return Container();
final banner = srvConfig.banner;
return Card(
color: banner.nature == BannerNature.Information
? Colors.blue
: banner.nature == BannerNature.Success
? Colors.green
: Colors.red,
child: Padding(
padding: const EdgeInsets.all(2.0),
child: Row(
children: [
BannerButton(
icon: Icon(
banner.nature == BannerNature.Information
? Icons.info
: banner.nature == BannerNature.Success
? Icons.check
: Icons.warning,
),
),
Expanded(
child: Text(
banner.message.containsKey(shortLang)
? banner.message[shortLang]
: banner.message["en"],
style: TextStyle(color: Colors.white),
),
),
banner.link == null
? Container()
: BannerButton(
onPressed: _openLink,
icon: Icon(Icons.open_in_new),
),
BannerButton(
onPressed: _hideBanner,
icon: Icon(Icons.close),
)
],
),
),
);
}
}
class BannerButton extends StatelessWidget {
final Function() onPressed;
final Widget icon;
const BannerButton({this.onPressed, this.icon, Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return IconButton(
onPressed: onPressed,
icon: icon,
color: Colors.white,
disabledColor: Colors.white,
padding: EdgeInsets.all(1.0),
);
}
}

View File

@ -75,7 +75,7 @@ class _CountdownWidgetState extends State<CountdownWidget> {
value: remainingTime <= 0 value: remainingTime <= 0
? 1.0 ? 1.0
: 1 - (remainingTime / totalDuration), : 1 - (remainingTime / totalDuration),
backgroundColor: Theme.of(context).accentColor, backgroundColor: Theme.of(context).colorScheme.secondary,
valueColor: AlwaysStoppedAnimation<Color>( valueColor: AlwaysStoppedAnimation<Color>(
Theme.of(context).backgroundColor), Theme.of(context).backgroundColor),
), ),

View File

@ -43,7 +43,6 @@ class LoginRoutesTheme extends StatelessWidget {
backgroundColor: Config.get().splashBackgroundColor, backgroundColor: Config.get().splashBackgroundColor,
disabledColor: Colors.grey, disabledColor: Colors.grey,
highlightColor: Colors.white12, highlightColor: Colors.white12,
accentColor: Colors.white,
hintColor: Colors.white, hintColor: Colors.white,
textTheme: TextTheme(subtitle1: TextStyle(color: Colors.white)), textTheme: TextTheme(subtitle1: TextStyle(color: Colors.white)),
radioTheme: RadioThemeData( radioTheme: RadioThemeData(
@ -63,7 +62,7 @@ class LoginRoutesTheme extends StatelessWidget {
onBackground: Colors.white, onBackground: Colors.white,
onError: Colors.redAccent, onError: Colors.redAccent,
brightness: Brightness.dark, brightness: Brightness.dark,
)), ).copyWith(secondary: Colors.white)),
child: child, child: child,
); );
} }

View File

@ -1,4 +1,5 @@
import 'package:comunic/models/config.dart'; import 'package:comunic/models/config.dart';
import 'package:comunic/ui/widgets/banner_widget.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -43,40 +44,49 @@ class LoginScaffold extends StatelessWidget {
), ),
), ),
child: Scaffold( child: Scaffold(
body: SingleChildScrollView( body: SafeArea(
child: Center( child: Column(
child: Container( children: [
height: contentHeight, BannerWidget(),
child: ConstrainedBox( Expanded(
constraints: BoxConstraints(maxWidth: 300), child: SingleChildScrollView(
child: Column( child: Center(
children: <Widget>[ child: Container(
Spacer(flex: 3), height: contentHeight,
Text(config().appName, child: ConstrainedBox(
textAlign: TextAlign.center, constraints: BoxConstraints(maxWidth: 300),
style: TextStyle(fontSize: 50)), child: Column(
Spacer(flex: 1), children: <Widget>[
Text( Spacer(flex: 2),
tr(config().appQuickDescription ?? Text(config().appName,
tr("Free social network that respect your privacy")), textAlign: TextAlign.center,
textAlign: TextAlign.center, style: TextStyle(fontSize: 50)),
), Spacer(flex: 1),
Spacer(flex: 3), Text(
child != null tr(config().appQuickDescription ??
? Padding( tr("Free social network that respect your privacy")),
padding: const EdgeInsets.all(8.0), textAlign: TextAlign.center,
child: Material(
child: child,
color: Colors.indigo.shade500,
), ),
) Spacer(flex: 3),
: Container(), child != null
noStyleChild ?? Container(), ? Padding(
Spacer(flex: 3), padding: const EdgeInsets.all(8.0),
], child: Material(
child: child,
color: Colors.indigo.shade500,
),
)
: Container(),
noStyleChild ?? Container(),
Spacer(flex: 3),
],
),
),
),
),
), ),
), ),
), ],
), ),
), ),
), ),

View File

@ -382,9 +382,9 @@ class _PostCreateFormWidgetState extends State<PostCreateFormWidget> {
this._resetForm(); this._resetForm();
widget.onCreated(); widget.onCreated();
} catch (e) { } catch (e, s) {
setState(() => _isCreating = false); setState(() => _isCreating = false);
print("Error while creating post : " + e.toString()); print("Error while creating post : $e $s");
showSimpleSnack(context, tr("Could not create post !")); showSimpleSnack(context, tr("Could not create post !"));
} }
} }

View File

@ -1,7 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:settings_ui/settings_ui.dart'; import 'package:flutter_settings_ui/flutter_settings_ui.dart';
// ignore: must_be_immutable // ignore: must_be_immutable
class HeadSpacerSection extends CustomSection { class HeadSpacerSection extends CustomSection {
HeadSpacerSection() : super(child: Container(height: 10)); HeadSpacerSection() : super(child: Container(height: 10));
} }

View File

@ -1,6 +1,6 @@
import 'package:comunic/ui/dialogs/multi_choices_dialog.dart'; import 'package:comunic/ui/dialogs/multi_choices_dialog.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:settings_ui/settings_ui.dart'; import 'package:flutter_settings_ui/flutter_settings_ui.dart';
/// Multiple choices settings tile /// Multiple choices settings tile
/// ///
@ -14,7 +14,7 @@ class MultiChoicesSettingsTile<T> extends SettingsTile {
final Widget leading; final Widget leading;
final Widget trailing; final Widget trailing;
const MultiChoicesSettingsTile({ MultiChoicesSettingsTile({
Key key, Key key,
@required this.title, @required this.title,
@required this.choices, @required this.choices,

View File

@ -3,7 +3,7 @@ import 'package:comunic/utils/flutter_utils.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:comunic/utils/string_utils.dart'; import 'package:comunic/utils/string_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:settings_ui/settings_ui.dart'; import 'package:flutter_settings_ui/flutter_settings_ui.dart';
/// Text edit settings tile /// Text edit settings tile
/// ///
@ -22,7 +22,7 @@ class TextEditSettingsTile extends SettingsTile {
bool get readOnly => onChanged == null; bool get readOnly => onChanged == null;
const TextEditSettingsTile({ TextEditSettingsTile({
Key key, Key key,
@required this.title, @required this.title,
@required this.currValue, @required this.currValue,
@ -41,7 +41,7 @@ class TextEditSettingsTile extends SettingsTile {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SettingsTile( return SettingsTile(
title: title, title: title,
subtitle: isIOS ? reduceString(currValue, 20) :currValue, subtitle: isIOS ? reduceString(currValue, 20) : currValue,
onPressed: readOnly ? null : (_) => _changeValue(context), onPressed: readOnly ? null : (_) => _changeValue(context),
); );
} }

View File

@ -44,7 +44,6 @@ class ConversationWindowContainer extends StatelessWidget {
appBar: AppBarWrapper( appBar: AppBarWrapper(
height: 40, height: 40,
appBar: AppBar( appBar: AppBar(
textTheme: TextTheme(headline6: TextStyle(fontSize: 15)),
backgroundColor: appBarBgColor, backgroundColor: appBarBgColor,
leading: icon, leading: icon,
title: GestureDetector(child: title, onTap: onToggleCollapse), title: GestureDetector(child: title, onTap: onToggleCollapse),
@ -52,6 +51,10 @@ class ConversationWindowContainer extends StatelessWidget {
..add( ..add(
IconButton(icon: Icon(Icons.close), onPressed: onClose), IconButton(icon: Icon(Icons.close), onPressed: onClose),
), ),
toolbarTextStyle:
TextTheme(headline6: TextStyle(fontSize: 15)).bodyText2,
titleTextStyle:
TextTheme(headline6: TextStyle(fontSize: 15)).headline6,
)), )),
body: Visibility( body: Visibility(
child: body, child: body,

View File

@ -16,7 +16,6 @@ import 'package:comunic/utils/date_utils.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:comunic/utils/ui_utils.dart'; import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
/// Tablet mode of user page /// Tablet mode of user page
/// ///

View File

@ -1,5 +1,3 @@
import 'dart:ui';
import 'package:comunic/utils/input_utils.dart'; import 'package:comunic/utils/input_utils.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

View File

@ -0,0 +1,52 @@
import 'dart:typed_data';
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:jdenticon_dart/jdenticon_dart.dart';
import 'package:random_string/random_string.dart';
/// Identicon utilities
///
/// @author Pierre Hubert
// Based on https://stackoverflow.com/a/63215502/3781411
Future<Uint8List> svgToPng(BuildContext context, String svgString,
{int svgWidth, int svgHeight}) async {
DrawableRoot svgDrawableRoot = await svg.fromSvgString(svgString, null);
// to have a nice rendering it is important to have the exact original height and width,
// the easier way to retrieve it is directly from the svg string
// but be careful, this is an ugly fix for a flutter_svg problem that works
// with my images
String temp = svgString.substring(svgString.indexOf('height="') + 8);
int originalHeight =
svgHeight ?? int.parse(temp.substring(0, temp.indexOf('p')));
temp = svgString.substring(svgString.indexOf('width="') + 7);
int originalWidth =
svgWidth ?? int.parse(temp.substring(0, temp.indexOf('p')));
// toPicture() and toImage() don't seem to be pixel ratio aware, so we calculate the actual sizes here
double devicePixelRatio = MediaQuery.of(context).devicePixelRatio;
double width = originalHeight *
devicePixelRatio; // where 32 is your SVG's original width
double height = originalWidth * devicePixelRatio; // same thing
// Convert to ui.Picture
final picture = svgDrawableRoot.toPicture(size: Size(width, height));
// Convert to ui.Image. toImage() takes width and height as parameters
// you need to find the best size to suit your needs and take into account the screen DPI
final image = await picture.toImage(width.toInt(), height.toInt());
ByteData bytes = await image.toByteData(format: ImageByteFormat.png);
return bytes.buffer.asUint8List();
}
Future<Uint8List> genIdenticon(BuildContext context, {int size: 100}) async {
final identicon = Jdenticon.toSvg(randomString(25), size: size);
return svgToPng(context, identicon, svgHeight: size, svgWidth: size);
}

View File

@ -48,3 +48,10 @@ String tr(String string, {Map<String, String> args}) {
return string; return string;
} }
/// Get current lang, in format aa_BB
String get lang => _currLang != null ? _currLang : "en_US";
/// Get short lang format, in format aa
String get shortLang => lang.split("_")[0];

View File

@ -4,7 +4,6 @@ import 'package:comunic/ui/routes/single_post_route.dart';
import 'package:comunic/utils/intl_utils.dart'; import 'package:comunic/utils/intl_utils.dart';
import 'package:comunic/utils/ui_utils.dart'; import 'package:comunic/utils/ui_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
/// Navigation utilities /// Navigation utilities
/// ///

View File

@ -7,21 +7,21 @@ packages:
name: archive name: archive
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.13" version: "3.1.6"
args: args:
dependency: transitive dependency: transitive
description: description:
name: args name: args
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.6.0" version: "2.3.0"
async: async:
dependency: transitive dependency: transitive
description: description:
name: async name: async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.6.1" version: "2.8.2"
boolean_selector: boolean_selector:
dependency: transitive dependency: transitive
description: description:
@ -35,28 +35,42 @@ packages:
name: cached_network_image name: cached_network_image
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.5.1" version: "3.2.0"
cached_network_image_platform_interface:
dependency: transitive
description:
name: cached_network_image_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
cached_network_image_web:
dependency: transitive
description:
name: cached_network_image_web
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
characters: characters:
dependency: transitive dependency: transitive
description: description:
name: characters name: characters
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.2.0"
charcode: charcode:
dependency: transitive dependency: transitive
description: description:
name: charcode name: charcode
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.3.1"
chewie: chewie:
dependency: "direct main" dependency: "direct main"
description: description:
name: chewie name: chewie
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.2.2"
chewie_audio: chewie_audio:
dependency: "direct main" dependency: "direct main"
description: description:
@ -98,14 +112,14 @@ packages:
name: connectivity_for_web name: connectivity_for_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.0" version: "0.4.0+1"
connectivity_macos: connectivity_macos:
dependency: transitive dependency: transitive
description: description:
name: connectivity_macos name: connectivity_macos
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.2.0" version: "0.2.1+2"
connectivity_platform_interface: connectivity_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -113,33 +127,40 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.1" version: "2.0.1"
convert: cross_file:
dependency: transitive dependency: transitive
description: description:
name: convert name: cross_file
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.1" version: "0.3.2"
crypto: crypto:
dependency: transitive dependency: transitive
description: description:
name: crypto name: crypto
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.5" version: "3.0.1"
csslib: csslib:
dependency: transitive dependency: transitive
description: description:
name: csslib name: csslib
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.17.0" version: "0.17.1"
cupertino_icons: cupertino_icons:
dependency: "direct main" dependency: "direct main"
description: description:
name: cupertino_icons name: cupertino_icons
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.4"
dart_webrtc:
dependency: transitive
description:
name: dart_webrtc
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3" version: "1.0.3"
dio: dio:
dependency: "direct main" dependency: "direct main"
@ -147,7 +168,7 @@ packages:
name: dio name: dio
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.0.0" version: "4.0.4"
emoji_picker: emoji_picker:
dependency: "direct main" dependency: "direct main"
description: description:
@ -175,21 +196,21 @@ packages:
name: ffi name: ffi
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.1" version: "1.1.2"
file: file:
dependency: transitive dependency: transitive
description: description:
name: file name: file
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "6.1.1" version: "6.1.2"
file_picker: file_picker:
dependency: "direct main" dependency: "direct main"
description: description:
name: file_picker name: file_picker
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.2+2" version: "4.3.0"
filesize: filesize:
dependency: "direct main" dependency: "direct main"
description: description:
@ -203,42 +224,42 @@ packages:
name: firebase_core name: firebase_core
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.10.6"
firebase_core_platform_interface: firebase_core_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: firebase_core_platform_interface name: firebase_core_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.0.1" version: "4.2.3"
firebase_core_web: firebase_core_web:
dependency: transitive dependency: transitive
description: description:
name: firebase_core_web name: firebase_core_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.5.3"
firebase_messaging: firebase_messaging:
dependency: "direct main" dependency: "direct main"
description: description:
name: firebase_messaging name: firebase_messaging
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "10.0.0" version: "11.2.4"
firebase_messaging_platform_interface: firebase_messaging_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: firebase_messaging_platform_interface name: firebase_messaging_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.0" version: "3.1.4"
firebase_messaging_web: firebase_messaging_web:
dependency: transitive dependency: transitive
description: description:
name: firebase_messaging_web name: firebase_messaging_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0" version: "2.2.5"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@ -250,21 +271,21 @@ packages:
name: flutter_blurhash name: flutter_blurhash
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.5.0" version: "0.6.0"
flutter_cache_manager: flutter_cache_manager:
dependency: transitive dependency: transitive
description: description:
name: flutter_cache_manager name: flutter_cache_manager
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.2" version: "3.3.0"
flutter_colorpicker: flutter_colorpicker:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_colorpicker name: flutter_colorpicker
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.0" version: "1.0.3"
flutter_emoji: flutter_emoji:
dependency: "direct main" dependency: "direct main"
description: description:
@ -278,14 +299,28 @@ packages:
name: flutter_launcher_icons name: flutter_launcher_icons
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.8.1" version: "0.9.2"
flutter_plugin_android_lifecycle: flutter_plugin_android_lifecycle:
dependency: transitive dependency: transitive
description: description:
name: flutter_plugin_android_lifecycle name: flutter_plugin_android_lifecycle
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.2" version: "2.0.5"
flutter_settings_ui:
dependency: "direct main"
description:
name: flutter_settings_ui
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
flutter_svg:
dependency: "direct main"
description:
name: flutter_svg
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
flutter_test: flutter_test:
dependency: "direct dev" dependency: "direct dev"
description: flutter description: flutter
@ -302,7 +337,7 @@ packages:
name: flutter_webrtc name: flutter_webrtc
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.3" version: "0.8.0"
html: html:
dependency: "direct main" dependency: "direct main"
description: description:
@ -316,7 +351,7 @@ packages:
name: http name: http
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.13.3" version: "0.13.4"
http_parser: http_parser:
dependency: "direct main" dependency: "direct main"
description: description:
@ -324,48 +359,41 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.0.0" version: "4.0.0"
identicon:
dependency: "direct main"
description:
name: identicon
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.1"
image: image:
dependency: transitive dependency: transitive
description: description:
name: image name: image
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.19" version: "3.1.0"
image_cropper: image_cropper:
dependency: "direct main" dependency: "direct main"
description: description:
name: image_cropper name: image_cropper
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.4.0" version: "1.4.1"
image_picker: image_picker:
dependency: "direct main" dependency: "direct main"
description: description:
name: image_picker name: image_picker
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.7.5+3" version: "0.8.4+4"
image_picker_for_web: image_picker_for_web:
dependency: transitive dependency: transitive
description: description:
name: image_picker_for_web name: image_picker_for_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0" version: "2.1.4"
image_picker_platform_interface: image_picker_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: image_picker_platform_interface name: image_picker_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0" version: "2.4.1"
intl: intl:
dependency: "direct main" dependency: "direct main"
description: description:
@ -373,6 +401,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.17.0" version: "0.17.0"
jdenticon_dart:
dependency: "direct main"
description:
name: jdenticon_dart
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
js: js:
dependency: transitive dependency: transitive
description: description:
@ -386,21 +421,21 @@ packages:
name: matcher name: matcher
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.12.10" version: "0.12.11"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0" version: "1.7.0"
mime: mime:
dependency: "direct main" dependency: "direct main"
description: description:
name: mime name: mime
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.0" version: "1.0.1"
nested: nested:
dependency: transitive dependency: transitive
description: description:
@ -414,7 +449,7 @@ packages:
name: octo_image name: octo_image
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.3.0" version: "1.0.1"
package_info: package_info:
dependency: "direct main" dependency: "direct main"
description: description:
@ -429,27 +464,55 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.0" version: "1.8.0"
path_drawing:
dependency: transitive
description:
name: path_drawing
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
path_parsing:
dependency: transitive
description:
name: path_parsing
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
path_provider: path_provider:
dependency: "direct main" dependency: "direct main"
description: description:
name: path_provider name: path_provider
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.2" version: "2.0.8"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
path_provider_ios:
dependency: transitive
description:
name: path_provider_ios
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.7"
path_provider_linux: path_provider_linux:
dependency: transitive dependency: transitive
description: description:
name: path_provider_linux name: path_provider_linux
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0" version: "2.1.4"
path_provider_macos: path_provider_macos:
dependency: transitive dependency: transitive
description: description:
name: path_provider_macos name: path_provider_macos
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0" version: "2.0.4"
path_provider_platform_interface: path_provider_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -463,70 +526,70 @@ packages:
name: path_provider_windows name: path_provider_windows
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.1" version: "2.0.4"
pedantic: pedantic:
dependency: transitive dependency: transitive
description: description:
name: pedantic name: pedantic
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.11.0" version: "1.11.1"
permission_handler: permission_handler:
dependency: "direct main" dependency: "direct main"
description: description:
name: permission_handler name: permission_handler
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "8.0.0+2" version: "8.3.0"
permission_handler_platform_interface: permission_handler_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: permission_handler_platform_interface name: permission_handler_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.5.0" version: "3.7.0"
petitparser: petitparser:
dependency: transitive dependency: transitive
description: description:
name: petitparser name: petitparser
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.1.0" version: "4.4.0"
photo_view: photo_view:
dependency: "direct main" dependency: "direct main"
description: description:
name: photo_view name: photo_view
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.11.1" version: "0.13.0"
pie_chart: pie_chart:
dependency: "direct main" dependency: "direct main"
description: description:
name: pie_chart name: pie_chart
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "5.0.0" version: "5.1.0"
platform: platform:
dependency: transitive dependency: transitive
description: description:
name: platform name: platform
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.0" version: "3.1.0"
plugin_platform_interface: plugin_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: plugin_platform_interface name: plugin_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0" version: "2.0.2"
process: process:
dependency: transitive dependency: transitive
description: description:
name: process name: process
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.2.1" version: "4.2.4"
provider: provider:
dependency: transitive dependency: transitive
description: description:
@ -540,28 +603,21 @@ packages:
name: random_string name: random_string
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0" version: "2.3.1"
record_mp3: record_mp3:
dependency: "direct main" dependency: "direct main"
description: description:
name: record_mp3 name: record_mp3
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0" version: "3.0.0"
rxdart: rxdart:
dependency: transitive dependency: transitive
description: description:
name: rxdart name: rxdart
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.25.0" version: "0.27.3"
settings_ui:
dependency: "direct main"
description:
name: settings_ui
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
shared_preferences: shared_preferences:
dependency: "direct main" dependency: "direct main"
description: description:
@ -615,14 +671,14 @@ packages:
name: sqflite name: sqflite
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0+3" version: "2.0.1"
sqflite_common: sqflite_common:
dependency: transitive dependency: transitive
description: description:
name: sqflite_common name: sqflite_common
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0+2" version: "2.1.0"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
@ -657,7 +713,7 @@ packages:
name: table_calendar name: table_calendar
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.0" version: "3.0.3"
term_glyph: term_glyph:
dependency: transitive dependency: transitive
description: description:
@ -671,7 +727,7 @@ packages:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.3.0" version: "0.4.3"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
@ -685,56 +741,70 @@ packages:
name: url_launcher name: url_launcher
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "6.0.4" version: "6.0.17"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.13"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.13"
url_launcher_linux: url_launcher_linux:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_linux name: url_launcher_linux
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0" version: "2.0.2"
url_launcher_macos: url_launcher_macos:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_macos name: url_launcher_macos
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0" version: "2.0.2"
url_launcher_platform_interface: url_launcher_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_platform_interface name: url_launcher_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.3" version: "2.0.4"
url_launcher_web: url_launcher_web:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_web name: url_launcher_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0" version: "2.0.5"
url_launcher_windows: url_launcher_windows:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_windows name: url_launcher_windows
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0" version: "2.0.2"
uuid: uuid:
dependency: transitive dependency: transitive
description: description:
name: uuid name: uuid
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.2.2" version: "3.0.5"
vector_math: vector_math:
dependency: transitive dependency: transitive
description: description:
name: vector_math name: vector_math
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0" version: "2.1.1"
version: version:
dependency: "direct main" dependency: "direct main"
description: description:
@ -748,77 +818,84 @@ packages:
name: video_player name: video_player
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.4" version: "2.2.10"
video_player_platform_interface: video_player_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: video_player_platform_interface name: video_player_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.1.0" version: "5.0.0"
video_player_web: video_player_web:
dependency: transitive dependency: transitive
description: description:
name: video_player_web name: video_player_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.0" version: "2.0.5"
video_thumbnail: video_thumbnail:
dependency: "direct main" dependency: "direct main"
description: description:
name: video_thumbnail name: video_thumbnail
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.3.3" version: "0.4.3"
wakelock: wakelock:
dependency: "direct main" dependency: "direct main"
description: description:
name: wakelock name: wakelock
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.5.2" version: "0.5.6"
wakelock_macos: wakelock_macos:
dependency: transitive dependency: transitive
description: description:
name: wakelock_macos name: wakelock_macos
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.0+1" version: "0.4.0"
wakelock_platform_interface: wakelock_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: wakelock_platform_interface name: wakelock_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.2.1+1" version: "0.3.0"
wakelock_web: wakelock_web:
dependency: transitive dependency: transitive
description: description:
name: wakelock_web name: wakelock_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.2.0+1" version: "0.4.0"
wakelock_windows: wakelock_windows:
dependency: transitive dependency: transitive
description: description:
name: wakelock_windows name: wakelock_windows
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.0" version: "0.2.0"
web_socket_channel: web_socket_channel:
dependency: "direct main" dependency: "direct main"
description: description:
name: web_socket_channel name: web_socket_channel
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "2.1.0"
webrtc_interface:
dependency: transitive
description:
name: webrtc_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
win32: win32:
dependency: transitive dependency: transitive
description: description:
name: win32 name: win32
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.1" version: "2.3.3"
xdg_directories: xdg_directories:
dependency: transitive dependency: transitive
description: description:
@ -832,14 +909,14 @@ packages:
name: xml name: xml
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.5.1" version: "5.3.1"
yaml: yaml:
dependency: transitive dependency: transitive
description: description:
name: yaml name: yaml
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.2.1" version: "3.1.0"
sdks: sdks:
dart: ">=2.13.0 <3.0.0" dart: ">=2.15.0 <3.0.0"
flutter: ">=2.0.0" flutter: ">=2.5.0"

View File

@ -11,7 +11,7 @@ description: Comunic client
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.1.9+16 version: 1.1.10+17
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"
@ -31,14 +31,14 @@ dependencies:
sqflite: ^2.0.0+2 sqflite: ^2.0.0+2
# Image picker is used whenever the user wants to send an image # Image picker is used whenever the user wants to send an image
image_picker: ^0.7.2+1 image_picker: ^0.8.4+4
# The HTTP client is used to make requests on the Comunic API # The HTTP client is used to make requests on the Comunic API
dio: ^4.0.0-beta7 dio: ^4.0.0-beta7
http_parser: ^4.0.0 http_parser: ^4.0.0
# This plugins allows to load remote images # This plugins allows to load remote images
cached_network_image: ^2.0.0 cached_network_image: ^3.2.0
# URL launcher is useful to open URL in the phone browser # URL launcher is useful to open URL in the phone browser
url_launcher: ^6.0.2 url_launcher: ^6.0.2
@ -56,34 +56,37 @@ dependencies:
flutter_emoji: ^2.2.1+1 flutter_emoji: ^2.2.1+1
# Build settings UI # Build settings UI
settings_ui: ^1.0.0 flutter_settings_ui: ^2.0.1
# Generate identicons # Generate identicons
identicon: ^0.1.1 jdenticon_dart: ^2.0.0
# Render SVG images
flutter_svg: ^1.0.0
# Generate random strings # Generate random strings
random_string: ^2.0.1 random_string: ^2.0.1
# Display zoomable images # Display zoomable images
photo_view: ^0.11.1 photo_view: ^0.13.0
# Check Internet connection # Check Internet connection
connectivity: ^3.0.2 connectivity: ^3.0.2
# Establish WebSocket connections # Establish WebSocket connections
web_socket_channel: ^1.1.0 web_socket_channel: ^2.1.0
# Events manager # Events manager
event_bus: ^2.0.0 event_bus: ^2.0.0
# WebRTC calls # WebRTC calls
flutter_webrtc: ^0.6.3 flutter_webrtc: ^0.8.0
# Prevent phone from auto-locking during calls # Prevent phone from auto-locking during calls
wakelock: ^0.5.2 wakelock: ^0.5.2
# Pick any kind of file # Pick any kind of file
file_picker: ^3.0.0 file_picker: ^4.3.0
# Get information about current version # Get information about current version
package_info: ^2.0.0 package_info: ^2.0.0
@ -109,10 +112,10 @@ dependencies:
mime: ^1.0.0 mime: ^1.0.0
# Create video thumbnails # Create video thumbnails
video_thumbnail: ^0.3.3 video_thumbnail: ^0.4.3
# Record audio file # Record audio file
record_mp3: ^2.1.0 record_mp3: ^3.0.0
# Request permissions # Request permissions
permission_handler: ^8.0.0+2 permission_handler: ^8.0.0+2
@ -121,14 +124,14 @@ dependencies:
emoji_picker: ^0.1.0 emoji_picker: ^0.1.0
# Color picker # Color picker
flutter_colorpicker: ^0.4.0 flutter_colorpicker: ^1.0.3
# Image cropper # Image cropper
image_cropper: ^1.4.0 image_cropper: ^1.4.0
# Firebase cloud messaging (for push notifications) # Firebase cloud messaging (for push notifications)
firebase_core: ^1.0.1 firebase_core: ^1.0.1
firebase_messaging: ^10.0.0 firebase_messaging: ^11.2.4
# Forez presence # Forez presence
table_calendar: ^3.0.0 table_calendar: ^3.0.0
@ -138,7 +141,7 @@ dev_dependencies:
sdk: flutter sdk: flutter
# Generate iOS application icons # Generate iOS application icons
flutter_launcher_icons: ^0.8.1 flutter_launcher_icons: ^0.9.2
flutter_icons: flutter_icons:
android: false android: false