improve hardening options
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter_mozilla_components/src/pigeons/gecko.g.dart';
|
||||
|
||||
final _apiInstance = GeckoPrefApi();
|
||||
@@ -16,7 +18,7 @@ class GeckoPrefService {
|
||||
final value = switch (pref.value) {
|
||||
final bool x => '$x',
|
||||
final int x => '$x',
|
||||
final String x => "'$x'", //Use single ticks to allow json
|
||||
final String x => jsonEncode(x),
|
||||
_ => throw Exception('Unknow pref type'),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user