@@ -965,6 +965,84 @@ public static final class Builder {
965
965
}
966
966
}
967
967
968
+ /** Generated class from Pigeon that represents data sent in messages. */
969
+ public static class LoginModelStateData {
970
+ private @ Nullable ModelState state ;
971
+ public @ Nullable ModelState getState () { return state ; }
972
+ public void setState (@ Nullable ModelState setterArg ) {
973
+ this .state = setterArg ;
974
+ }
975
+
976
+ private @ Nullable Boolean is_loading ;
977
+ public @ Nullable Boolean getIs_loading () { return is_loading ; }
978
+ public void setIs_loading (@ Nullable Boolean setterArg ) {
979
+ this .is_loading = setterArg ;
980
+ }
981
+
982
+ private @ Nullable Long oldHash ;
983
+ public @ Nullable Long getOldHash () { return oldHash ; }
984
+ public void setOldHash (@ Nullable Long setterArg ) {
985
+ this .oldHash = setterArg ;
986
+ }
987
+
988
+ private @ Nullable Long newHash ;
989
+ public @ Nullable Long getNewHash () { return newHash ; }
990
+ public void setNewHash (@ Nullable Long setterArg ) {
991
+ this .newHash = setterArg ;
992
+ }
993
+
994
+ public static final class Builder {
995
+ private @ Nullable ModelState state ;
996
+ public @ NonNull Builder setState (@ Nullable ModelState setterArg ) {
997
+ this .state = setterArg ;
998
+ return this ;
999
+ }
1000
+ private @ Nullable Boolean is_loading ;
1001
+ public @ NonNull Builder setIs_loading (@ Nullable Boolean setterArg ) {
1002
+ this .is_loading = setterArg ;
1003
+ return this ;
1004
+ }
1005
+ private @ Nullable Long oldHash ;
1006
+ public @ NonNull Builder setOldHash (@ Nullable Long setterArg ) {
1007
+ this .oldHash = setterArg ;
1008
+ return this ;
1009
+ }
1010
+ private @ Nullable Long newHash ;
1011
+ public @ NonNull Builder setNewHash (@ Nullable Long setterArg ) {
1012
+ this .newHash = setterArg ;
1013
+ return this ;
1014
+ }
1015
+ public @ NonNull LoginModelStateData build () {
1016
+ LoginModelStateData pigeonReturn = new LoginModelStateData ();
1017
+ pigeonReturn .setState (state );
1018
+ pigeonReturn .setIs_loading (is_loading );
1019
+ pigeonReturn .setOldHash (oldHash );
1020
+ pigeonReturn .setNewHash (newHash );
1021
+ return pigeonReturn ;
1022
+ }
1023
+ }
1024
+ @ NonNull Map <String , Object > toMap () {
1025
+ Map <String , Object > toMapResult = new HashMap <>();
1026
+ toMapResult .put ("state" , state == null ? null : state .index );
1027
+ toMapResult .put ("is_loading" , is_loading );
1028
+ toMapResult .put ("oldHash" , oldHash );
1029
+ toMapResult .put ("newHash" , newHash );
1030
+ return toMapResult ;
1031
+ }
1032
+ static @ NonNull LoginModelStateData fromMap (@ NonNull Map <String , Object > map ) {
1033
+ LoginModelStateData pigeonResult = new LoginModelStateData ();
1034
+ Object state = map .get ("state" );
1035
+ pigeonResult .setState (state == null ? null : ModelState .values ()[(int )state ]);
1036
+ Object is_loading = map .get ("is_loading" );
1037
+ pigeonResult .setIs_loading ((Boolean )is_loading );
1038
+ Object oldHash = map .get ("oldHash" );
1039
+ pigeonResult .setOldHash ((oldHash == null ) ? null : ((oldHash instanceof Integer ) ? (Integer )oldHash : (Long )oldHash ));
1040
+ Object newHash = map .get ("newHash" );
1041
+ pigeonResult .setNewHash ((newHash == null ) ? null : ((newHash instanceof Integer ) ? (Integer )newHash : (Long )newHash ));
1042
+ return pigeonResult ;
1043
+ }
1044
+ }
1045
+
968
1046
/** Generated class from Pigeon that represents data sent in messages. */
969
1047
public static class LoginModelEventData {
970
1048
private @ Nullable LoginModelEvent event ;
@@ -1106,6 +1184,7 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value)
1106
1184
public interface MainModelBridge {
1107
1185
@ NonNull MainModelStateData getState ();
1108
1186
@ NonNull MainModelEventData getEvent ();
1187
+ void resetEvent ();
1109
1188
void initState ();
1110
1189
void loadNextPage ();
1111
1190
void filter (@ NonNull SnippetFilter filter );
@@ -1155,6 +1234,25 @@ static void setup(BinaryMessenger binaryMessenger, MainModelBridge api) {
1155
1234
channel .setMessageHandler (null );
1156
1235
}
1157
1236
}
1237
+ {
1238
+ BasicMessageChannel <Object > channel =
1239
+ new BasicMessageChannel <>(binaryMessenger , "dev.flutter.pigeon.MainModelBridge.resetEvent" , getCodec ());
1240
+ if (api != null ) {
1241
+ channel .setMessageHandler ((message , reply ) -> {
1242
+ Map <String , Object > wrapped = new HashMap <>();
1243
+ try {
1244
+ api .resetEvent ();
1245
+ wrapped .put ("result" , null );
1246
+ }
1247
+ catch (Error | RuntimeException exception ) {
1248
+ wrapped .put ("error" , wrapError (exception ));
1249
+ }
1250
+ reply .reply (wrapped );
1251
+ });
1252
+ } else {
1253
+ channel .setMessageHandler (null );
1254
+ }
1255
+ }
1158
1256
{
1159
1257
BinaryMessenger .TaskQueue taskQueue = binaryMessenger .makeBackgroundTaskQueue ();
1160
1258
BasicMessageChannel <Object > channel =
@@ -1536,6 +1634,9 @@ protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) {
1536
1634
case (byte )128 :
1537
1635
return LoginModelEventData .fromMap ((Map <String , Object >) readValue (buffer ));
1538
1636
1637
+ case (byte )129 :
1638
+ return LoginModelStateData .fromMap ((Map <String , Object >) readValue (buffer ));
1639
+
1539
1640
default :
1540
1641
return super .readValueOfType (type , buffer );
1541
1642
@@ -1547,6 +1648,10 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value)
1547
1648
stream .write (128 );
1548
1649
writeValue (stream , ((LoginModelEventData ) value ).toMap ());
1549
1650
} else
1651
+ if (value instanceof LoginModelStateData ) {
1652
+ stream .write (129 );
1653
+ writeValue (stream , ((LoginModelStateData ) value ).toMap ());
1654
+ } else
1550
1655
{
1551
1656
super .writeValue (stream , value );
1552
1657
}
@@ -1555,15 +1660,36 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value)
1555
1660
1556
1661
/** Generated interface from Pigeon that represents a handler of messages from Flutter. */
1557
1662
public interface LoginModelBridge {
1663
+ @ NonNull LoginModelStateData getState ();
1558
1664
@ NonNull LoginModelEventData getEvent ();
1559
1665
void loginOrRegister (@ NonNull String email , @ NonNull String password );
1666
+ void checkLoginState ();
1560
1667
void resetEvent ();
1561
1668
1562
1669
/** The codec used by LoginModelBridge. */
1563
1670
static MessageCodec <Object > getCodec () {
1564
1671
return LoginModelBridgeCodec .INSTANCE ; }
1565
1672
/**Sets up an instance of `LoginModelBridge` to handle messages through the `binaryMessenger`. */
1566
1673
static void setup (BinaryMessenger binaryMessenger , LoginModelBridge api ) {
1674
+ {
1675
+ BasicMessageChannel <Object > channel =
1676
+ new BasicMessageChannel <>(binaryMessenger , "dev.flutter.pigeon.LoginModelBridge.getState" , getCodec ());
1677
+ if (api != null ) {
1678
+ channel .setMessageHandler ((message , reply ) -> {
1679
+ Map <String , Object > wrapped = new HashMap <>();
1680
+ try {
1681
+ LoginModelStateData output = api .getState ();
1682
+ wrapped .put ("result" , output );
1683
+ }
1684
+ catch (Error | RuntimeException exception ) {
1685
+ wrapped .put ("error" , wrapError (exception ));
1686
+ }
1687
+ reply .reply (wrapped );
1688
+ });
1689
+ } else {
1690
+ channel .setMessageHandler (null );
1691
+ }
1692
+ }
1567
1693
{
1568
1694
BasicMessageChannel <Object > channel =
1569
1695
new BasicMessageChannel <>(binaryMessenger , "dev.flutter.pigeon.LoginModelBridge.getEvent" , getCodec ());
@@ -1612,6 +1738,25 @@ static void setup(BinaryMessenger binaryMessenger, LoginModelBridge api) {
1612
1738
channel .setMessageHandler (null );
1613
1739
}
1614
1740
}
1741
+ {
1742
+ BasicMessageChannel <Object > channel =
1743
+ new BasicMessageChannel <>(binaryMessenger , "dev.flutter.pigeon.LoginModelBridge.checkLoginState" , getCodec ());
1744
+ if (api != null ) {
1745
+ channel .setMessageHandler ((message , reply ) -> {
1746
+ Map <String , Object > wrapped = new HashMap <>();
1747
+ try {
1748
+ api .checkLoginState ();
1749
+ wrapped .put ("result" , null );
1750
+ }
1751
+ catch (Error | RuntimeException exception ) {
1752
+ wrapped .put ("error" , wrapError (exception ));
1753
+ }
1754
+ reply .reply (wrapped );
1755
+ });
1756
+ } else {
1757
+ channel .setMessageHandler (null );
1758
+ }
1759
+ }
1615
1760
{
1616
1761
BasicMessageChannel <Object > channel =
1617
1762
new BasicMessageChannel <>(binaryMessenger , "dev.flutter.pigeon.LoginModelBridge.resetEvent" , getCodec ());
0 commit comments