You're using URI that contains data after comma as it is defined by RFC-2397. Dart's Uri class is based on RFC-3986, so you can't use it. Split the string by comma and take the last part of it:
String uri = 'data:image/gif;base64,...';
Uint8List _bytes = base64.decode(uri.split(',').last);
Example code will useful for beginners ☺️
GestureDetector(
onTap:(){
showDialog(context: context, builder: (context){
var img64 = snapshot.getStudentDetailModel?.courseDetails?.pscPaymetSlip;
final decodestring = base64Decode('$img64'.split(',').last);
Uint8List encodeedimg = decodestring;
  return AlertDialog(
         contentPadding: EdgeInsets.zero,
         content: Column(
                  mainAxisSize: MainAxisSize.min,
                  children: [
                  Container(
                   height:300,
                   decoration: BoxDecoration(
                   image: DecorationImage(
                   fit: BoxFit.cover,
                   image: MemoryImage(encodeedimg))),),],),);
                                      });
                                      },
                   child:Text('View',                                                 textAlign:TextAlign.end),),