21 lines
669 B
Dart
21 lines
669 B
Dart
import 'package:flutter/foundation.dart';
|
|
import 'package:flutter/widgets.dart';
|
|
|
|
import 'app_url_strategy.dart';
|
|
import 'pipelines_app.dart';
|
|
import 'server_endpoint.dart';
|
|
|
|
/// Native builds must supply their server explicitly; there is no baked host.
|
|
const configuredServerUrl = String.fromEnvironment('PIPELINES_SERVER_URL');
|
|
|
|
/// Resolves the endpoint for this launch and starts the normal composition.
|
|
void runPipelinesApp({Uri? base, String configured = configuredServerUrl}) {
|
|
useAppUrlStrategy();
|
|
final server = ServerEndpoint.resolve(
|
|
base: base ?? Uri.base,
|
|
web: kIsWeb,
|
|
configured: configured,
|
|
);
|
|
runApp(PipelinesApp(server: server));
|
|
}
|