blob: 86073b615d867437c2f81402fab00a9f1664a764 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import 'package:web/web.dart' as web;
final RegExp recipeRegex = RegExp(r'^\/recipe\/(\d+)$');
void main() {
print('Dart infrastructure is available.');
print('Window location: `${web.window.location}`');
if (recipeRegex.hasMatch(web.window.location.pathname)) {
recipe();
return;
}
print('Frontend code is inactive for this path `${web.window.location.pathname}`.');
}
void recipe() {
print('Handling /recipe page.');
}
|