mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Start update
This commit is contained in:
@ -32,7 +32,7 @@ class BBCodeParsedWidget extends StatelessWidget {
|
||||
}
|
||||
|
||||
/// Initialize parsing
|
||||
static _Element _parse(String text, {_ElementStyle style}) {
|
||||
static _Element _parse(String text) {
|
||||
try {
|
||||
return _parseRecur(
|
||||
text: text,
|
||||
@ -213,7 +213,7 @@ class _ElementStyle {
|
||||
|
||||
/// Generate corresponding TextStyle
|
||||
TextStyle toTextStyle(BuildContext context) {
|
||||
return Theme.of(context).textTheme.body1.copyWith(
|
||||
return Theme.of(context).textTheme.bodyText2.copyWith(
|
||||
decoration: decoration,
|
||||
fontWeight: fontWeight,
|
||||
fontStyle: fontStyle,
|
||||
|
@ -1,5 +1,3 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
@ -13,7 +11,7 @@ enum _ChooseImageSource { GALLERY, CAMERA }
|
||||
/// Ask the user to choose an image, either from the gallery or using the camera
|
||||
///
|
||||
/// Returns null in case of failure
|
||||
Future<File> pickImage(BuildContext context) async {
|
||||
Future<PickedFile> pickImage(BuildContext context) async {
|
||||
/// First, we ask the user to choose between image picker and camera
|
||||
final result = await showDialog<_ChooseImageSource>(
|
||||
context: context,
|
||||
@ -42,8 +40,7 @@ Future<File> pickImage(BuildContext context) async {
|
||||
);
|
||||
|
||||
if (result == null) return null;
|
||||
|
||||
return await ImagePicker.pickImage(
|
||||
return await ImagePicker().getImage(
|
||||
source: result == _ChooseImageSource.CAMERA
|
||||
? ImageSource.camera
|
||||
: ImageSource.gallery);
|
||||
|
@ -39,8 +39,8 @@ Widget buildErrorCard(String message,
|
||||
if (hide) return Container();
|
||||
|
||||
return Theme(
|
||||
data:
|
||||
ThemeData(textTheme: TextTheme(body1: TextStyle(color: Colors.white))),
|
||||
data: ThemeData(
|
||||
textTheme: TextTheme(bodyText2: TextStyle(color: Colors.white))),
|
||||
child: Card(
|
||||
elevation: 2.0,
|
||||
color: Colors.red,
|
||||
|
Reference in New Issue
Block a user