mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-11 05:14:46 +00:00
Merge branch 'new-world' of github.com:cake-tech/cake_wallet_private into new-world
This commit is contained in:
commit
f7fe9d76a5
1 changed files with 11 additions and 5 deletions
|
@ -2,6 +2,12 @@ import 'dart:math';
|
|||
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
extension StringExtension on String {
|
||||
String capitalized() {
|
||||
return "${this[0].toUpperCase()}${this.substring(1)}";
|
||||
}
|
||||
}
|
||||
|
||||
Future<String> generateName() async {
|
||||
final randomThing = Random();
|
||||
final adjectiveStringRaw =
|
||||
|
@ -12,7 +18,7 @@ Future<String> generateName() async {
|
|||
final nouns = List<String>.from(nounStringRaw.split('\n'));
|
||||
final chosenAdjective = adjectives[randomThing.nextInt(adjectives.length)];
|
||||
final chosenNoun = nouns[randomThing.nextInt(nouns.length)];
|
||||
final returnString = chosenAdjective + ' ' + chosenNoun;
|
||||
|
||||
final returnString =
|
||||
chosenAdjective.capitalized() + ' ' + chosenNoun.capitalized();
|
||||
return returnString;
|
||||
}
|
Loading…
Reference in a new issue