@@ -349,10 +349,12 @@ void main() {
349349
350350 final context = LDContextBuilder ().kind ('user' , 'user-key' ).build ();
351351
352- await flagPersistence.init (context, basicData, environmentId: 'test-env-123' );
352+ await flagPersistence.init (context, basicData,
353+ environmentId: 'test-env-123' );
353354
354355 // Environment ID should be stored separately
355- expect (mockPersistence.storage[sdkKeyPersistence]! ['EnvironmentId' ], 'test-env-123' );
356+ expect (mockPersistence.storage[sdkKeyPersistence]! ['EnvironmentId' ],
357+ 'test-env-123' );
356358 });
357359
358360 test ('it loads environment ID from persistence' , () async {
@@ -396,7 +398,8 @@ void main() {
396398 expect (flagStore.environmentId, 'cached-env-456' );
397399 });
398400
399- test ('it handles missing environment ID in persistence gracefully' , () async {
401+ test ('it handles missing environment ID in persistence gracefully' ,
402+ () async {
400403 final context = LDContextBuilder ().kind ('user' , 'user-key' ).build ();
401404 final contextPersistenceKey =
402405 sha256.convert (utf8.encode (context.canonicalKey)).toString ();
@@ -430,7 +433,8 @@ void main() {
430433 expect (flagStore.environmentId, null );
431434 });
432435
433- test ('it does not store environment ID when maxCachedContexts is 0' , () async {
436+ test ('it does not store environment ID when maxCachedContexts is 0' ,
437+ () async {
434438 final flagStore = FlagStore ();
435439 final mockPersistence = MockPersistence ();
436440 final flagPersistence = FlagPersistence (
@@ -444,14 +448,20 @@ void main() {
444448
445449 final context = LDContextBuilder ().kind ('user' , 'user-key' ).build ();
446450
447- await flagPersistence.init (context, basicData, environmentId: 'test-env-123' );
451+ await flagPersistence.init (context, basicData,
452+ environmentId: 'test-env-123' );
448453
449454 // Only the index should be stored, not the context data or environment ID
450- expect (mockPersistence.storage[sdkKeyPersistence]! .containsKey ('EnvironmentId' ), false );
451- expect (mockPersistence.storage[sdkKeyPersistence]! .length, 1 ); // Just the index
455+ expect (
456+ mockPersistence.storage[sdkKeyPersistence]!
457+ .containsKey ('EnvironmentId' ),
458+ false );
459+ expect (mockPersistence.storage[sdkKeyPersistence]! .length,
460+ 1 ); // Just the index
452461 });
453462
454- test ('it does not store environment ID when environment ID is null' , () async {
463+ test ('it does not store environment ID when environment ID is null' ,
464+ () async {
455465 final flagStore = FlagStore ();
456466 final mockPersistence = MockPersistence ();
457467 final flagPersistence = FlagPersistence (
@@ -465,10 +475,14 @@ void main() {
465475
466476 final context = LDContextBuilder ().kind ('user' , 'user-key' ).build ();
467477
468- await flagPersistence.init (context, basicData); // No environment ID provided
478+ await flagPersistence.init (
479+ context, basicData); // No environment ID provided
469480
470481 // Environment ID should not be in storage when it's null
471- expect (mockPersistence.storage[sdkKeyPersistence]! .containsKey ('EnvironmentId' ), false );
482+ expect (
483+ mockPersistence.storage[sdkKeyPersistence]!
484+ .containsKey ('EnvironmentId' ),
485+ false );
472486 });
473487 });
474488
0 commit comments