Skip to content

Commit

Permalink
Rename to DevelopmentStageBanner.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas-Sander committed Feb 7, 2024
1 parent 8c9f305 commit 4c6e6b7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions app/lib/main/sharezone.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import 'package:sharezone/onboarding/group_onboarding/logic/signed_up_bloc.dart'
import 'package:sharezone/sharezone_plus/subscription_service/subscription_flag.dart';
import 'package:sharezone/util/flavor.dart';
import 'package:sharezone/widgets/animation/color_fade_in.dart';
import 'package:sharezone/widgets/deployment_stage_banner.dart';
import 'package:sharezone/widgets/development_stage_banner.dart';
import 'package:sharezone_utils/device_information_manager.dart';
import 'package:sharezone_widgets/sharezone_widgets.dart';

Expand Down Expand Up @@ -111,7 +111,7 @@ class _SharezoneState extends State<Sharezone> with WidgetsBindingObserver {
textDirection: TextDirection.ltr,
child: _ThemeSettingsProvider(
blocDependencies: widget.blocDependencies,
child: DeploymentStageBanner(
child: DevelopmentStageBanner(
child: Stack(
children: [
MultiProvider(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:sharezone/main/constants.dart';

/// Displays the current deployment stage as a [Banner] if it is not stable.
/// Displays the current development stage as a [Banner] if it is not stable.
///
/// Sharezone has different deployment stages e.g. "alpha", "beta", "preview".
/// This widget displays the current deployment stage as a [Banner] at the top
/// hand corner of the screen if we are not in the stable/production deployment
/// Sharezone has different development stages e.g. "alpha", "beta", "preview".
/// This widget displays the current development stage as a [Banner] at the top
/// hand corner of the screen if we are not in the stable/production development
/// stage.
///
/// This is intended so that users know that they are using a non-stable version
Expand All @@ -23,9 +23,9 @@ import 'package:sharezone/main/constants.dart';
/// This widget is similar and inspired by the [CheckedModeBanner] which displays
/// "DEBUG" at the top right hand corner when running a Flutter app in debug
/// mode.
class DeploymentStageBanner extends StatelessWidget {
class DevelopmentStageBanner extends StatelessWidget {
/// Creates a const alpha version banner.
const DeploymentStageBanner({
const DevelopmentStageBanner({
super.key,
required this.child,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:golden_toolkit/golden_toolkit.dart';
import 'package:sharezone/main/constants.dart';
import 'package:sharezone/widgets/deployment_stage_banner.dart';
import 'package:sharezone/widgets/development_stage_banner.dart';

void main() {
group('$DeploymentStageBanner', () {
group('$DevelopmentStageBanner', () {
testGoldens(
'displays the banner at the correct position',
(tester) async {
kDevelopmentStageOrNull = 'alpha';

await tester.pumpWidgetBuilder(
const DeploymentStageBanner(
const DevelopmentStageBanner(
child: MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
Expand All @@ -42,7 +42,7 @@ void main() {
await tester.pumpWidget(
const Directionality(
textDirection: TextDirection.ltr,
child: DeploymentStageBanner(
child: DevelopmentStageBanner(
child: MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
Expand All @@ -66,7 +66,7 @@ void main() {
await tester.pumpWidget(
const Directionality(
textDirection: TextDirection.ltr,
child: DeploymentStageBanner(
child: DevelopmentStageBanner(
child: MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
Expand Down

0 comments on commit 4c6e6b7

Please sign in to comment.