set_window_title 0.0.1
set_window_title: ^0.0.1 copied to clipboard
A Flutter plugin to set the current window title on desktop platforms (Windows and macOS).
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:set_window_title/set_window_title.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
final _setWindowTitlePlugin = SetWindowTitle();
var _counter = 1;
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Plugin example app')),
body: Center(
child: ElevatedButton(
onPressed: () {
_setWindowTitlePlugin.setTitle(
"New Window Title δΈζ πβ€οΈππΆβπ«οΈ $_counter",
);
setState(() {
_counter++;
});
},
child: const Text('Set Window Title'),
),
),
),
);
}
}