Merge branch 'new-world' of github.com:cake-tech/cake_wallet_private into new-world

This commit is contained in:
M 2020-10-26 11:38:22 +02:00
commit f7fe9d76a5

View file

@ -2,6 +2,12 @@ import 'dart:math';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
extension StringExtension on String {
String capitalized() {
return "${this[0].toUpperCase()}${this.substring(1)}";
}
}
Future<String> generateName() async { Future<String> generateName() async {
final randomThing = Random(); final randomThing = Random();
final adjectiveStringRaw = final adjectiveStringRaw =
@ -12,7 +18,7 @@ Future<String> generateName() async {
final nouns = List<String>.from(nounStringRaw.split('\n')); final nouns = List<String>.from(nounStringRaw.split('\n'));
final chosenAdjective = adjectives[randomThing.nextInt(adjectives.length)]; final chosenAdjective = adjectives[randomThing.nextInt(adjectives.length)];
final chosenNoun = nouns[randomThing.nextInt(nouns.length)]; final chosenNoun = nouns[randomThing.nextInt(nouns.length)];
final returnString = chosenAdjective + ' ' + chosenNoun; final returnString =
chosenAdjective.capitalized() + ' ' + chosenNoun.capitalized();
return returnString; return returnString;
} }