mirror of
https://bitbucket.org/FransoletThomas/tablet-app.git
synced 2025-12-06 08:31:19 +00:00
Fix some issues (map search + video)
This commit is contained in:
parent
67dc2cd743
commit
a8ee72c11b
@ -16,6 +16,7 @@ import 'package:tablet_app/Screens/Map/tree_node.dart';
|
|||||||
import 'package:tablet_app/app_context.dart';
|
import 'package:tablet_app/app_context.dart';
|
||||||
import 'package:tablet_app/constants.dart';
|
import 'package:tablet_app/constants.dart';
|
||||||
import 'package:html/parser.dart' show parse;
|
import 'package:html/parser.dart' show parse;
|
||||||
|
import 'package:diacritic/diacritic.dart';
|
||||||
|
|
||||||
import 'map_context.dart';
|
import 'map_context.dart';
|
||||||
|
|
||||||
@ -190,7 +191,11 @@ class _GeoPointFilterState extends State<GeoPointFilter> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool _nodeOrChildrenContainsText(TreeNode node, String searchText) {
|
bool _nodeOrChildrenContainsText(TreeNode node, String searchText) {
|
||||||
if (node.title.toLowerCase().contains(searchText)) {
|
// Remove accent and other special characters
|
||||||
|
String normalizedSearchText = removeDiacritics(searchText.toLowerCase());
|
||||||
|
String normalizedTitle = removeDiacritics(node.title.toLowerCase());
|
||||||
|
|
||||||
|
if (normalizedTitle.contains(normalizedSearchText)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
for (var childNode in node.children) {
|
for (var childNode in node.children) {
|
||||||
|
|||||||
@ -31,7 +31,7 @@ class _VideoView extends State<VideoView> {
|
|||||||
if (videoDTO!.source_ != null && videoDTO!.source_!.length > 0 ) {
|
if (videoDTO!.source_ != null && videoDTO!.source_!.length > 0 ) {
|
||||||
videoId = YoutubePlayer.convertUrlToId(videoDTO!.source_!);
|
videoId = YoutubePlayer.convertUrlToId(videoDTO!.source_!);
|
||||||
|
|
||||||
if (kIsWeb) {
|
if (true) {
|
||||||
final _controllerWeb = iframe.YoutubePlayerController(
|
final _controllerWeb = iframe.YoutubePlayerController(
|
||||||
params: iframe.YoutubePlayerParams(
|
params: iframe.YoutubePlayerParams(
|
||||||
mute: false,
|
mute: false,
|
||||||
@ -94,6 +94,6 @@ class _VideoView extends State<VideoView> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) => videoDTO!.source_ != null && videoDTO!.source_!.length > 0 ?
|
Widget build(BuildContext context) => videoDTO!.source_ != null && videoDTO!.source_!.length > 0 ?
|
||||||
(kIsWeb ? _videoViewWeb! : _videoView!):
|
(true ? _videoViewWeb! : _videoView!):
|
||||||
Center(child: Text("La vidéo ne peut pas être affichée, l'url est incorrecte", style: new TextStyle(fontSize: kNoneInfoOrIncorrect)));
|
Center(child: Text("La vidéo ne peut pas être affichée, l'url est incorrecte", style: new TextStyle(fontSize: kNoneInfoOrIncorrect)));
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user